POV-Ray : Newsgroups : povray.newusers : vaxis_rotate : Re: vaxis_rotate Server Time
5 Sep 2024 04:18:43 EDT (-0400)
  Re: vaxis_rotate  
From: Christopher James Huff
Date: 17 Jul 2002 13:13:55
Message: <chrishuff-EF7684.12084417072002@netplex.aussie.org>
In article <3d359a2b@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   On the other hand, it would sometimes be useful to be able to rotate
> a point/object around an axis *not* going through the origin. Is there
> a standard macro for this?

Well, it isn't hard, just:
Orig + vaxis_rotate(Pt - Orig, Axis, Amt)

Since there is a Rotate_Around_Trans() macro and an Axis_Rotate_Trans() 
macro, I guess a Axis_Rotate_Around_Trans() macro wouldn't be out of 
place, though I'm not sure how useful it would be. How about:

#macro Axis_Rotate_Around_Trans(Orig, Axis, Amt)
    transform {
        translate -Orig
        Axis_Rotate_Trans(Axis, Amt)
        translate Orig
    }
#end

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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