POV-Ray : Newsgroups : povray.general : Regular Polygons & Prisms : Re: Regular Polygons & Prisms Server Time
11 Aug 2024 07:14:31 EDT (-0400)
  Re: Regular Polygons & Prisms  
From: Andrea Ryan
Date: 8 Oct 1999 19:00:27
Message: <37FE7698.EA91502D@global2000.net>
After a little testing, I found that the macro worked fine for prisms with
a odd number of sides, but it doesn't work prisms that have an even number
of sides.
I think the problem is in this code:

#local rotation_no = 0;
#while (rotation_no<sides)
#local angle_of_rotation = 360/sides;
#local temp_vec=vrotate(<0,1,0>,<0,1,angle_of_rotation*rotation_no>);
#local vec=<temp_vec.y,temp_vec.z>;
#local rotation_no = rotation_no+1;
//the stuff that writes to the data file
#end

When a prism with a even number of sides is created, one of the points has
a coordinate with an incorrect sign. Thanks for your help.
Brendan Ryan

Andrea Ryan wrote:

> I am trying to create a macro for making regular polygons and prisms. I
> can't get one point to rotate to the vertexes.
> Brendan Ryan


Post a reply to this message

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