POV-Ray : Newsgroups : povray.general : Star Macro : Re: Star Macro Server Time
10 Aug 2024 23:18:08 EDT (-0400)
  Re: Star Macro  
From: Andrea Ryan
Date: 11 Oct 1999 12:10:58
Message: <38020B13.83CA3CA1@global2000.net>
I tried to divide every other vector by ptmove but it didn't work. This code
rotates and moves the odd numbered points and just rotates the even numbered
points. The code is in a while loop. Rotation_no and point_no both get added
to one at the end.
Brendan Ryan

#local determine = (point_no/2)-int(point_no/2);
#switch (determine)
#case (0.5)  //odd numbered point
#local vec =vrotate(<0,1,0>,<0,0,(angle_of_rotation*rotation_no)>/ptmove);
#break
#case (0) //even numbered point
#local vec=vrotate(<0,1,0>,<0,0,angle_of_rotation*rotation_no>);
#break
#end



Kevin Wampler wrote:

> Andrea Ryan wrote:
>
> > I'll try to make solid star prisms if I find out how to move a point
> > towards the origin.
> > Brendan Ryan
>
> Multiply the coordinates of your point by the fraction of how much closer
> you want the point to be to the origin.  For example, if you have a point
> <x,y,z> and you want it to be only half as far away from the origin, it's
> new coordinate will be .5*<x,y,z>


Post a reply to this message

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