POV-Ray : Newsgroups : povray.newusers : rotate to given point : Re: rotate to given point Server Time
30 Jul 2024 02:13:36 EDT (-0400)
  Re: rotate to given point  
From: Jim Charter
Date: 20 Nov 2004 09:28:53
Message: <419f54a5$1@news.povray.org>
Slime wrote:
>>How to rotate it by:  rotate <RX,RY,0>  so that point will be placed in
>>coordinates <X,Y,Z> ?  Point <X,Y,Z> is also on sphere {0 100}
> 
> 
> 
> Use Reorient_Trans along with vtransform in transforms.inc.
> 
> #include "transforms.inc"
> 
> #declare reorient = Reorient_Trans(-z, <X,Y,Z>)
> #declare point = vtransform(<0,0,-100>, reorient);
> 
>  - Slime
>  [ http://www.slimeland.com/ ]
> 
> 
Cool  I never thought of that.  Beautiful.
Instead I rewrote the Reorient_Trans macro to use
vector functions.  But your way is better.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.