POV-Ray : Newsgroups : povray.general : Help creating a 5-pointed gem like star Server Time
1 Nov 2024 09:21:21 EDT (-0400)
  Help creating a 5-pointed gem like star (Message 1 to 8 of 8)  
From: busabus
Subject: Help creating a 5-pointed gem like star
Date: 12 Nov 2004 06:55:01
Message: <web.4194a37fc3889db3abbc0b2f0@news.povray.org>
I've been out of the POV scene for quite a few years (since I left
compuserve!) and I'm trying to get back into it.

I'm attempting to create a 3D 5-pointed star that is faceted like a gem,
kind of like this
http://www.lidinc.com/Merchant2/graphics/00000001/SM%20STAR%20K166%20GIF.jpg,
and it's bugging me.  I know I could create it by calculating the points
and putting them into a mesh, but there must be a simpler way of getting
POV to do all the hard work.

Any pointers/links etc would be really helpful.

Many thanks

Dan


Post a reply to this message

From: Skeety
Subject: Re: Help creating a 5-pointed gem like star
Date: 12 Nov 2004 08:50:00
Message: <web.4194bf2d8348af124f8e18070@news.povray.org>
"busabus" <nomail@nomail> wrote:
> I've been out of the POV scene for quite a few years (since I left
> compuserve!) and I'm trying to get back into it.
>
> I'm attempting to create a 3D 5-pointed star that is faceted like a gem,
> kind of like this
> http://www.lidinc.com/Merchant2/graphics/00000001/SM%20STAR%20K166%20GIF.jpg,
> and it's bugging me.  I know I could create it by calculating the points
> and putting them into a mesh, but there must be a simpler way of getting
> POV to do all the hard work.
>
> Any pointers/links etc would be really helpful.
>
> Many thanks
>
> Dan

Using math, and pyrimids, I think you might be able to create one
pretty easy.


Post a reply to this message

From: busabus
Subject: Re: Help creating a 5-pointed gem like star
Date: 12 Nov 2004 10:15:00
Message: <web.4194cc3d8348af12abbc0b2f0@news.povray.org>
"Skeety" <nomail@nomail> wrote:
> "busabus" <nomail@nomail> wrote:
> > I've been out of the POV scene for quite a few years (since I left
> > compuserve!) and I'm trying to get back into it.
> >
> > I'm attempting to create a 3D 5-pointed star that is faceted like a gem,
> > kind of like this
> > http://www.lidinc.com/Merchant2/graphics/00000001/SM%20STAR%20K166%20GIF.jpg,
> > and it's bugging me.  I know I could create it by calculating the points
> > and putting them into a mesh, but there must be a simpler way of getting
> > POV to do all the hard work.
> >
> > Any pointers/links etc would be really helpful.
> >
> > Many thanks
> >
> > Dan
>
> Using math, and pyrimids, I think you might be able to create one
> pretty easy.

Seeing as there isn't a pyramid primitive (please correct me if I'm wrong)
are you suggesting using cubes and plane intersections?


Post a reply to this message

From: Le Forgeron
Subject: Re: Help creating a 5-pointed gem like star
Date: 12 Nov 2004 10:41:56
Message: <Xns959FA9DF23052jgrimbertmeandmyself@203.29.75.35>


> 
> Seeing as there isn't a pyramid primitive (please correct me if I'm
> wrong) are you suggesting using cubes and plane intersections?
> 

What about using a prism with a conic sweep for half of it. Then mirror it.



-- 




l'habillement, les chaussures que le maquillage et les accessoires.


Post a reply to this message

From: Mike Williams
Subject: Re: Help creating a 5-pointed gem like star
Date: 12 Nov 2004 13:09:33
Message: <dRnfYAAJxPlBFwFG@econym.demon.co.uk>
Wasn't it busabus who wrote:
>I've been out of the POV scene for quite a few years (since I left
>compuserve!) and I'm trying to get back into it.
>
>I'm attempting to create a 3D 5-pointed star that is faceted like a gem,
>kind of like this
>http://www.lidinc.com/Merchant2/graphics/00000001/SM%20STAR%20K166%20GIF.jpg,
>and it's bugging me.  I know I could create it by calculating the points
>and putting them into a mesh, but there must be a simpler way of getting
>POV to do all the hard work.
>
>Any pointers/links etc would be really helpful.

How about using five stretched octahedrons, something like this but with
better material and lighting?

#version 3.6;
global_settings {
  assumed_gamma 1.0
  max_trace_level 15  
}
camera {location  <-4,5,-20> look_at <0,0,0> angle 40}
background {rgb 1}
light_source {<-30, 100, -30> color rgb 1}

#include"shapes.inc"
#include"shapes2.inc"
#include"glass.inc"

union {
  #declare N=0;
  #while (N<5)
    object{Octahedron
      scale <1,1.9,1>       // stretch in y direction
      rotate y*45           // bring an edge to the front
      translate y*1.3       // move away from centre
      rotate z*360/5*N      // rotate each point
    }
    #declare N=N+1;
  #end
  texture {T_Old_Glass}
  interior {I_Glass1}
}



-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Tom Melly
Subject: Re: Help creating a 5-pointed gem like star
Date: 14 Nov 2004 15:00:04
Message: <4197b944@news.povray.org>
"busabus" <nomail@nomail> wrote in message
news:web.4194a37fc3889db3abbc0b2f0@news.povray.org...

> and it's bugging me.  I know I could create it by calculating the points
> and putting them into a mesh, but there must be a simpler way of getting

The more I think about this the more I think a mesh is the way to go.

Not really that hard - build your mesh using a macro.


Post a reply to this message

From: busabus
Subject: Re: Help creating a 5-pointed gem like star
Date: 15 Nov 2004 09:50:00
Message: <web.4198c12c8348af12abbc0b2f0@news.povray.org>
"Tom Melly" <pov### [at] tomandlucouk> wrote:
> "busabus" <nomail@nomail> wrote in message
> news:web.4194a37fc3889db3abbc0b2f0@news.povray.org...
>
> > and it's bugging me.  I know I could create it by calculating the points
> > and putting them into a mesh, but there must be a simpler way of getting
>
> The more I think about this the more I think a mesh is the way to go.
>
> Not really that hard - build your mesh using a macro.

Thanks to everyone for their help on this.  I ended up going down the
intersection route by cutting a cube into what I'd call a sloped three
sided pyramid, then squashing it, copying it, squashing that and copying
that.

#include "glass.inc"

camera { location  <-2, 0, -4> look_at <0, 0, 0> angle 40}
background { color rgb 1 }
light_source {<5,5,-5> colour rgb 1}


#declare starGlass =
texture {
  pigment{rgbf <1,1,0,0.8>}
  finish {F_Glass9}
}

#declare facet =
difference {
  box {<-0.5001,0.5001,0.5001> <0.5001,-0.5001,-0.5001>}
  object {
    plane {z,0}
    rotate <45,0,0>
  }
  object {
    plane {x,0}
    rotate <0,0,-45>
  }
  translate <-0.5,0.5,-0.5>
  scale<0.5,1,0.5>
  rotate<0,-45,0>

}

#declare point =
merge {
 #declare i=1;
 #while(i<=4)
 object{facet
        rotate<0,90*i,0>
        translate<0,0,0>
        }
 #declare i=i+1;
 #end
 scale<0.75,1,0.5>
}


merge{
  #declare i=1;
  #while(i<=5)
  object{point
         rotate<0,0,72*i>
         }
  #declare i=i+1;
  #end
  texture {starGlass}
  interior {I_Glass1}
  photons {
     target
     refraction on
     reflection on
   }
}

If anyone's got some comments on this code then please feel free.  Also
suggestions on getting the gem to sparkly a bit and not look like crap I
would be grateful for.

Cheers
Daniel


Post a reply to this message

From: Shay
Subject: Re: Help creating a 5-pointed gem like star
Date: 17 Nov 2004 15:48:19
Message: <419bb913$1@news.povray.org>
busabus wrote:

> If anyone's got some comments on this code then please feel free.

Not nice enough for a subject item. Good enough for something small.

> Also suggestions on getting the gem to sparkly a bit and not look
> like crap I would be grateful for.

Add more facets. You really need to just make this a mesh.

  -Shay


Post a reply to this message

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