|
|
Jakob Kosowski <jak### [at] obilotde> wrote:
: Could someone tell my how to make polyhedra in POVRay?
It depends on what kind of polyhedra you want. How many faces? Regular,
irregular? If irregular, how many different faces? How many sides per face?
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
|
|
|
They are all in the standard include file 'shapes2.inc'. See that file fore
details. So:
#include "shapes2.inc"
object{Tetrahedron pigment{White} ...}
object{Octahedron ...}
object{Dodecahedron ...}
object{Icosahedron ...}
You can even do
object{Hexagon ...}
tough I don't know if that makes scenes. Isn't it always better just to use a box
for that?
- Micha
Jakob Kosowski wrote:
>
> > It depends on what kind of polyhedra you want. How many faces? Regular,
> > irregular? If irregular, how many different faces? How many sides per
> face?
>
> Regular. I mean Tetrahedron, Hexahedron (i can do that with a box),
> Octahedron,
> Dodecahedron and Icosahedron.
--
Micha Riser email address: mri### [at] gmxnet
http://www.povworld.de/ The World of POV-Ray!
Post a reply to this message
|
|
|
|
Jakob Kosowski wrote:
> > It depends on what kind of polyhedra you want. How many faces? Regular,
> > irregular? If irregular, how many different faces? How many sides per
> face?
>
> Regular. I mean Tetrahedron, Hexahedron (i can do that with a box),
> Octahedron,
> Dodecahedron and Icosahedron.
You can intersect planes for a "solid" one, or for speed's sake you can use
triangle meshes. I have an include file for mesh polyhedra at my site if you
want.
--
David Fontaine <dav### [at] faricynet> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
|
|
|
/* By Jakob Kosowski, www.obilot.de, jak### [at] obilotde
Rendering the slow version took 42 minutes and 45 s on my Pentium 133
with 64 MB of SDRAM.
Rendering the new, faster one only 18 minutes and 26 s.
Thanks to Micha Riser (for the old version) and to David Fontaine (for
the new one and
his include file "meshpoly.inc", from http://davidf.faricy.net/
*/
//#include "shapes.inc" /*to get the old, slower one, uncomment these */
//#include "shapes2.inc"
#include "colors.inc"
#include "woods.inc"
#include "stones.inc"
#include "meshpoly.inc" /*and comment this out. You will have to adjust
the size of the Tetrahedron. */
camera {
location <0, 0, 7>
look_at <0, 0, 0>
}
object {Icosahedron
texture{P_WoodGrain1A}
translate <-2,0,0>
}
object {Tetrahedron
texture{P_WoodGrain9A}
translate <2,0,0>
}
object {Octahedron
texture{T_Stone2
scale 4}
translate <-1,2,0>
}
object {Dodecahedron
texture{T_Stone3}
translate <0,-2,0>
}
box {
<-1,-1,-1>,
< 1, 1, 1>
texture {T_Stone25
scale 4}
rotate y*20
translate <2.5,1.5,0>
}
light_source { <2, 2, 2> color White}
light_source { <-2, -2, -2> color White}
light_source { <0, 0, 0> color White}
light_source { <0, -3, 0> color White}
light_source { <-2,0,0> color White}
plane { y, 500
texture {
pigment { SkyBlue }
finish { ambient 1 diffuse 0}
}
texture {
pigment {
bozo
turbulence .5
color_map {
[0 White]
[1 White filter 1]
}
}
finish { ambient 1 diffuse 0 }
scale <1000, 250, 250>
rotate <5, 45, 0>
}
}
plane {y,-12
texture {
pigment {
color <.85, .5, .15>
}
finish {
ambient .25
diffuse .6
crand .5
}
normal {
ripples .35
turbulence .25
frequency 5
}
scale 10
translate 50*x
}
}
Post a reply to this message
|
|