POV-Ray : Newsgroups : povray.general : Regular Polygons & Prisms : Re: Regular Polygons & Prisms Server Time
11 Aug 2024 07:13:07 EDT (-0400)
  Re: Regular Polygons & Prisms  
From: Andrea Ryan
Date: 7 Oct 1999 20:35:28
Message: <37FD3B62.1178E21F@global2000.net>
Now, the macro is nearly perfect. It can create whole prism statements but the part
that
omits the comma after the last vector doesn't work. Here's the code:  (which is inside
a
while loop)
Brendan Ryan

#write (data, "","\n")
#write (data, "",vec,"")
#ifndef (comma_no)
#local comma_no = sides;
#end
#if (comma_no>0)
#write (data, "",",")
#else
#local comma_no = comma_no-1
#end

Remco de Korte wrote:

> Andrea Ryan wrote:
> >
> > Yay! It worked! I rendered a regular pentagon! But... there's still a little
problem.
> > I used the following code:
> >
> > #if (-0.000000000000000244921<=vec.u<=0.000000000000000244921)
> > #declare vec=<0,1>;
> > #end
> >
> > and the first three vectors were <0,1> when there should be only one at the
beginning.
> >
> > The second and third vectors had negative numbers in them.
> >
> > The last vector didn't match the first one. I want them to be alike so there would
be
> > no warnings. I might use the quadratic and cubic splines after adding the control
> > points. If a prism using quadratic or cubic splines is not closed, POV-Ray will
> > generate a error message.
> >
> > Brendan Ryan
> >
>
> Closing is easier if you just copy the first point to the last. There is no way
> that can go wrong (the stuff in between however....)
>
> Cheers!
>
> Remco


Post a reply to this message

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