[Papervision3D] Conversion between Spherical and Cartesian Coordinates Systems

o renken renkster at gmail.com
Thu Jun 4 02:02:29 PDT 2009


Ive got no code for you, but a while ago i found this link. strict
theoretical, but maybe its able to push you in the right direction:
http://mathworld.wolfram.com/Sphere.html



2009/6/4 brawlis <brawlis at live.com>

>
> Hello
>
> I have problems with conversion from certisan to spherical coordinate
> systems.
>
> I used formula from wikipedia
> http://en.wikipedia.org/wiki/Spherical_coordinates
> but nothing, then I tried:
> public function InverseCordinates(x:Number,y:Number,z:Number):Number2D{
>        var cordinates:Number2D = new Number2D(0,0);
>        cordinates.x = Math.atan2(x,z)/(2*Math.PI);
>        if(cordinates.x < 0){
>                cordinates.x += 1;
>        }
>        cordinates.y = Math.atan2(Math.sqrt(x*x+z*z),y)/Math.PI;
>
>        return cordinates;
> }
>
> But nothing :( :(
> --
> View this message in context:
> http://www.nabble.com/Conversion-between-Spherical-and-Cartesian-Coordinates-Systems-tp23811651p23811651.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>



-- 
http://www.renkster.de/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090604/5ee4be95/attachment.html>


More information about the Papervision3D mailing list