OZONE Asylum
Forums
DHTML/Javascript
Speeding up texture mapping onto a sphere in JS
This page's ID:
30586
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I've been dabbling at a very basic level with some 3d stuff for a while, not fully comprehending the maths, etc, behind it. Over the last few weeks, I've been reading more material than I care to imagine including some great stuff at Wolfram MathWorld, and finally got my head around mapping points onto a sphere. I've taken it one step further now, after reading this handy guide to texture mapping onto a sphere ([url]http://www.codeproject.com/KB/graphics/Sphere_mapping.aspx[/url]) and have come up with a very basic 2d canvas implementation: http://www.soterm.com/spheremap/index_v3.html Right now, it runs very, very nicely in Chrome, but like a dog in Fx 2, Safari, and not at all in Opera 9.5. Fire up Chrome and have a play - the z-rotation is automatic, but you can drag any of the X/Y/Z sliders at any stage. It's entirely possible my maths is shot to bits, but I'm wondering if there is any way of speeding it up in Fx2 / Safari at all? One issue I'm aware of is that the algorithm to map img -> sphere leaves gaps at a larger radius, presumably because it isn't stretching the image, but just doing basic mapping x/y -> theta/phi. I found another guide ([url]http://local.wasp.uwa.edu.au/~pbourke/texture_colour/spheremap/[/url]) which sounds like it might address this issue, but I've yet to play around with it :D Thanks in advance for any tips on optimisation! Dan [small](Edited by [url=http://www.ozoneasylum.com/user/4819]BillyRayPreachersSon[/url] on 10-05-2008 13:32)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »