POV-Ray : Newsgroups : povray.general : Regular Polygons & Prisms : Re: Regular Polygons & Prisms Server Time
11 Aug 2024 01:20:12 EDT (-0400)
  Re: Regular Polygons & Prisms  
From: Andrea Ryan
Date: 6 Oct 1999 23:40:12
Message: <37FC1530.62EAFF12@global2000.net>
I used your code but it still made 3d vectors. The last point should be the same
as the first one. This is the code that creates the vectors.

#fopen data "data.inc" append
#local rotation_no = 0;
#while (rotation_no<=sides)
#local angle_of_rotation = 360/sides;
#local temp_vec=vrtotate(<0,1,0>,<0,0,angle_of_rotation*rotation_no>);
#local vec=<temp_vec.x,temp_vec.y>;
#local rotation_no = rotation_no+1;
#write (data, "",vec,"")
#end

Remco de Korte wrote:

> 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
>
> I'm not sure if I understand you right but you might have a look at a macro I
> made that produces (regular) polygons (with a soft edge). It's at:
> http://www.xs4all.nl/~remcodek/pov.html (look for the softform-include).
>
> Good luck,
>
> Remco


Post a reply to this message

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