POV-Ray : Newsgroups : povray.newusers : Macro for a pentagram Server Time
23 Nov 2024 23:21:26 EST (-0500)
  Macro for a pentagram (Message 1 to 5 of 5)  
From: RayZ
Subject: Macro for a pentagram
Date: 29 Jun 2011 22:35:01
Message: <web.4e0be0526edbbc44416ed4460@news.povray.org>
Hi. I am making a macro for a pentagram, or a 5-pointed star. I have tried to do
that by using an intersection of 5 triangles, but then I learned intersection
doesn't work. So is there another way to make one?

#macro pentagram(A,B,C,D,E)

object{pentagon(A,B,C,D,E)}
clipped_by{
//so what to clip
}

#end


Post a reply to this message

From: clipka
Subject: Re: Macro for a pentagram
Date: 29 Jun 2011 23:04:17
Message: <4e0be7b1$1@news.povray.org>
Am 30.06.2011 04:32, schrieb RayZ:
> Hi. I am making a macro for a pentagram, or a 5-pointed star. I have tried to do
> that by using an intersection of 5 triangles, but then I learned intersection
> doesn't work. So is there another way to make one?

Maybe the "prism" object helps you with whatever you're trying to 
achieve; with "linear_spline", you just give it the corner points of an 
arbitrary 2D polygon, and POV-Ray will extrude it in the 3rd dimension.


Post a reply to this message

From: Warp
Subject: Re: Macro for a pentagram
Date: 30 Jun 2011 04:47:44
Message: <4e0c3830@news.povray.org>
RayZ <the### [at] gmailcom> wrote:
> Hi. I am making a macro for a pentagram, or a 5-pointed star. I have tried to do
> that by using an intersection of 5 triangles, but then I learned intersection
> doesn't work. So is there another way to make one?

  Is there a reason it has to be an intersection of triangles rather than
a simple union of them?

-- 
                                                          - Warp


Post a reply to this message

From: RayZ
Subject: Re: Macro for a pentagram
Date: 30 Jun 2011 08:00:00
Message: <web.4e0c6514e3429ae5416ed4460@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> RayZ <the### [at] gmailcom> wrote:
> > Hi. I am making a macro for a pentagram, or a 5-pointed star. I have tried to do
> > that by using an intersection of 5 triangles, but then I learned intersection
> > doesn't work. So is there another way to make one?
>
>   Is there a reason it has to be an intersection of triangles rather than
> a simple union of them?
>
> --
>                                                           - Warp

Well, I want to make it so that I can define 5 points, and it will make a
"filled" pentagram.
Of course, I can use union, but then I will have to define ten points.
(Goal is to use it to make shapes, and I will use vertices from the shapes to
define the 5 vertices the pentagram will be made on)


Post a reply to this message

From: Warp
Subject: Re: Macro for a pentagram
Date: 30 Jun 2011 08:23:31
Message: <4e0c6ac2@news.povray.org>
RayZ <the### [at] gmailcom> wrote:
> Well, I want to make it so that I can define 5 points, and it will make a
> "filled" pentagram.
> Of course, I can use union, but then I will have to define ten points.
> (Goal is to use it to make shapes, and I will use vertices from the shapes to
> define the 5 vertices the pentagram will be made on)

  You can write a little macro that creates the additional points
automatically from the 5 points.

  (Of course if you are creating a regular polygon, you can simply give
the macro the amount of vertices and it could then just create all the
points from that.)

-- 
                                                          - Warp


Post a reply to this message

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