"pbrants" <pbr### [at] telenetbe> wrote:
> Where can I retrieve the new position after a rotation (or transformation in
> general) of a point (let's say a center of a sphere or box) when I need that for
> future references or calculations?
>
> Paul
Hi I use this formula for retrieve the end point of a segment with 0-0-0 origin
leght=3,5 and rotation xrot-yrot-zrot
//rot x-y
#declare yt = 3.5* ( cos( radians(xrot) ) );
#declare xt = 3.5* ( sin( radians(yrot) ) * sin(radians(xrot) ) );
#declare zt = 3.5* ( cos( radians(yrot) ) * sin(radians(xrot) ) );
//rot xyz
#local yt1 = xt*sin( radians(zrot) ) + yt*cos( radians(zrot) ) ;
#local xt1 = xt*cos( radians(zrot) ) - yt*sin( radians(zrot) ) ;
//edge point
translate <xt1,yt1,zt>
Post a reply to this message
|