POV-Ray : Newsgroups : povray.general : Req: a #macro to reorient a vector : Re: Req: a #macro to reorient a vector Server Time
12 Aug 2024 17:15:44 EDT (-0400)
  Re: Req: a #macro to reorient a vector  
From: Stephen Lavedas
Date: 27 Jan 1999 01:12:23
Message: <36AEAE47.F589D818@virginia.edu>
Well, you are better at this math than I am...you can of course rotate
vectors around axis, (vaxis_rotate) also, if you know the length of a
vector (I believe there is a function for that) you could of course just
create a vector <L,0,0> where L is the length of the vector, and x is
the axis you want it along.  Otherwise, finding the angle between the
axis isn't too hard, just some simple trig involving the length of the
vector, and the component you want to lose (ie if you want it along the
xy plane, it would be asin(z/L)... I don't know exactly what you want,
but perhaps that helps?

Steve


Peter Popov wrote:
> 
> I know you can reorient  an object to lie along a specified axis, but
> I need to do the same with a vector. I have finished a twister include
> for creating really weird (and cool!) twisted objects, but I want to
> have a way to customize all the main functions (axis, radius, etc.),
> i.e. have a coil generated along a circle or any other #macro defined
> curve. Thanks for any help.
> 
> Peter


Post a reply to this message

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