|
|
"Tabea" <hio### [at] webde> wrote in message
news:web.3e8ec21356f9b3492b26ab750@news.povray.org...
tried
i
> thougt of was creating to boxes an rotate one and than make a csg but i
get
> eight edges
Yeah, you would, wouldn't you.
Here is an octagon head, and a hex head. They are very basic, but should
give you something to start with.
----------------------------
#version 3.5;
#include "colors.inc"
global_settings {
assumed_gamma 1.0
}
// ----------------------------------------
camera {
location <0.15,15,-15>
look_at <0.0, 0.0, 0.0>
angle 15
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, 30>
}
// ----------------------------------------
plane {
y, -1
pigment { color rgb <0.7,0.5,0.3> }
}
// intersection of two cubes to make an octagon
difference { //octagon screw gead
intersection {
box {
<-1,-1,-1>
<1,0,1>
}
box {
<-1,-1,-1>
<1,0,1>
rotate y*45
}
}
// subtract the slot
box { // slot
<1,1,.125>
<-1,-.25,-.125>
rotate y*45
}
// and that inset on the top
intersection { // inset
box {
<-1,-1,-1>
<1,0,1>
}
box {
<-1,-1,-1>
<1,0,1>
rotate y*45
}
scale .9
translate y*.85
}
rotate y*12.25
pigment {color LightBlue}
translate <2, 0, 1>
}
#declare Hexagon = intersection {
plane {x, 1} /* Rotate 90 in z axis to stand up */
plane {x, 1 rotate y*60}
plane {x, 1 rotate y *120}
plane {x, 1 rotate y *180}
plane {x, 1 rotate y *240}
plane {x, 1 rotate y *300}
plane { y, 0}
plane {-y,1}
bounded_by {sphere{0, 1.5}}
}
difference {
object { // plain head
Hexagon
}
box { // subtract the slot
<1,1,.125>
<-1,-.25,-.125>
}
object { // and the inset
Hexagon
scale .9
translate y*.8
}
pigment {color LightBlue}
translate -x * .75
}
HTH
Alan Walkington
Technical Staff
United Defense, San Jose
Post a reply to this message
|
|