POV-Ray : Newsgroups : povray.general : Creating a 5 point star? : Re: Creating a 5 point star? Server Time
3 Aug 2024 22:11:22 EDT (-0400)
  Re: Creating a 5 point star?  
From: Christian Bryndum
Date: 28 Sep 2003 02:31:08
Message: <3f76802c@news.povray.org>
Hi again,

Thanks guys, the different info cleared some things for me, but im still
running into some issues. Im trying to get the  it running like Ingo
mentioned, but by using Warp's vertex code. Which has been declared further
up, but i keep getting Float expected but vector or color expression found.
Kinda lost there. :(
Ive tried both of the point lines underneath here, since prisms need
coordinates to work. no luck.


prism {
linear_sweep
0,
1,
7,
<IP1>,<IP1>,<IP2>,<IP3>,<IP4>,<IP5>,<IP1>
//<P1,IP1>,<P1,IP1>,<P2,IP2>,<P3,IP3>,<P4,IP4>,<P5,IP5>,<P1,IP1>
pigment {Green}
}

Any more ideas?

Thanks in advance,
Chris.




"Warp" <war### [at] tagpovrayorg> wrote in message
news:3f7570fd@news.povray.org...
> Christian Bryndum <cbr### [at] deakineduau> wrote:
> >  Im a bit new in the PovRay environment, so this might be a stupid
question.
> > Im trying to create a 5 point star to use in a pentagram, but cant seem
to
> > figure out how it would be simplest and easiest way to do it.
> > Anyone got any ideas or hints?
>
>   This depends a lot on what kind of star you want to make.
>   For example, do you want to make the star with cylinders connecting
> opposing vertex points? Or do you want a polygon in the form of a star?
> Or should perhaps this polygon have depth (ie. be a prism)?
>
>   Getting the five vertex points of the star is easy:
>
> #declare P1 = y;
> #declare P2 = vrotate(y, z*360/5);
> #declare P3 = vrotate(y, z*2*360/5);
> #declare P4 = vrotate(y, z*3*360/5);
> #declare P5 = vrotate(y, z*4*360/5);
>
>   If you want to make a polygon/prism, you will need the five inner vertex
> points as well... Uh, that requires some math (supposing they must be
located
> so that edges of the star sould have the same direction on opposing
> vertices...). You can get them like this:
>
> #declare IP1 = vrotate(R*y, z*.5*360/5);
> #declare IP1 = vrotate(R*y, z*1.5*360/5);
> #declare IP1 = vrotate(R*y, z*2.5*360/5);
> #declare IP1 = vrotate(R*y, z*3.5*360/5);
> #declare IP1 = vrotate(R*y, z*4.5*360/5);
>
>   The only problem is calculating R.
>   You could probably just try some values for it (eg. 0.5).
>
> -- 
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb
x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// -
Warp -


Post a reply to this message

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