[vtkusers] Need for spherical to cartesian nonlinear transformation.

Roland Schwarz roland.schwarz at chello.at
Fri Mar 22 01:38:21 EST 2002


David,

> >
> > As a matter of facts my ordering is opposite:
> > Namely radius, azimuth angle [0..360 deg], polar angle[0..180 deg]
>
> The order I used was just the order given in my 1st year calculus
> text.
>
> > Is this because the local system, that is defined by the derivative is
right
> > handed in your case?
>
> Nothing so deep as that.  What I'll do is check through the VTK classes
> to see if spherical coordinates are used anywhere else, and ensure that
> the vtkShericalTransform agrees with the conventions use in the rest
> of VTK.
>

I've done a check in some mathematics and physics books. As far as I can see
your usage of coordinate ordering is consistent, and gives a right handed
local system too.

The ordering also depends on how you choose the polar angle. I found two
definitions:
1) from 0 .. 180 deg, beeing zero when cooincident with z-axis.
2) from -90..90 deg, beeing 90 when cooincident with z-axis.

In the latter case the ordering would have been reverse.

I did also a quick check on the vtk libs, and found vtkTextureMapToSphere.
Unfortunately it seems as if the author had choosen the other coordinate
ordering (but the local system is 2D there) giving a left handed system. But
I do not know the reasons for this either. There might be some special
considerations regarding texture mappings-

My personal opinion is to keep your ordering, since it looks mathematically
more consistent to me.

Roland







More information about the vtkusers mailing list