[Fwd: Re: [Fwd: 3D Rotation Transformation]]





-------- Original Message --------
Subject: 	Re: [Fwd: 3D Rotation Transformation]
Date: 	Thu, 11 Sep 2008 22:23:34 -0400
From: 	Tim Poston <tim.poston@gmail.com>
Reply-To: 	tim.poston@gmail.com
To: 	boisvert@nist.gov
References: 	<48C948A6.1030506@nist.gov>



It's much more efficient to transform the coefficients
Writing  cos/ t/   and  /sin t / as  /c/  and  /s/  for short,
the rotated cone is

   /x/² + (/cy - sz/)²  =  (/sy + cz/)²

   /x/² + (/c/²/ - s/²)/ y/²/ - /4/cs yz/ = (/c/²/ - s/²)/ z/²

or if we write/ /  cos/ /2/t/   and  /sin /2/t / as  /C/  and  /S/ 

   /x/² + /C //y/²/ - /2/S yz/ = /C //z/²

(I'm not quite clear from your description which direction the cone
is supposed to rotate -- turning vectors one way turns a function on vectors
the other way, and hence the same for its zero set -- but the difference
is only in the sign of /S/.  Try which works for you.)

Now you can test (/x,y,z/) directly for lying in the cone,
without transforming it first.

Tim Poston
Bangalore


2008/9/11 Ron Boisvert <boisvert@nist.gov <mailto:boisvert@nist.gov>>




    -------- Original Message --------
    Subject:        3D Rotation Transformation
    Date:   Wed, 10 Sep 2008 11:34:42 -0400
    From:   Sione <sionep@xtra.co.nz <mailto:sionep@xtra.co.nz>>
    Reply-To:       sionep@xtra.co.nz <mailto:sionep@xtra.co.nz>
    To:     boisvert@nist.gov <mailto:boisvert@nist.gov>
    References:     <4836D9F0.9010401@nist.gov
    <4836D9F0.9010401@nist.gov">mailto:4836D9F0.9010401@nist.gov>>




    Dear List,

    Perhaps, my problem is not related directly to JAMA, however I am
    using JAMA for a  3D ray-tracing visualization.

    Does anyone know  the  cartesian  representation of  a  cone (in
     3D)   after it has been rotated anti-clockwise along the  x-axis
     by  an  angle   t  ?     The  cartesian equation for the original
    cone   is :

    x^2 + y^2  =  (k*z)^2
    where   k   is  a  constant.   The [3x3]  transformation matrix for
    the rotation by angle  t  is :

    T = [ 1,     0,     0*;*    0,      cos(t),     -sin(t)*;*   0,    
    sin(t),      cos(t) ]

    If  a  point   P  , ie,  (x,y,z)  on the cone is rotated by  T,   it
    is maps into   say   point  P',  ie,  (x', y', z')   which  results in:

    x'  =  x
    y'  = cos(t)*y - sin(t)*z
    z'  =  sin(t)*y + cos(t)*z

    Can my rotated (transformed) cone be now represented by:

    x*'*^2 + y*'*^2  =  (k*z*'*)^2

    The cartesian equation of the transformed  cone is really needed,
    since it is easy to compute the normal  vector to any point on the
    transformed cone's surface via  Jacobian.  Once the normal vector is
    calculated for a specific point on the transformed cone, then
     Snell's Law (from optics)  is applied to the incident  ray vector
    that is refracted by the transparent  cone.

    Is my interpretation correct here that the cartesian of the
    transformed cone is  x*'*^2 + y*'*^2  =  (k*z*'*)^2   ?

    Any hints would be appreciated.

    Thanks,
    Sione.











Date Index | Thread Index | Problems or questions? Contact list-master@nist.gov