|
|
Can anyone explain why there is a gap between the triangles?
Mick
camera{location <0.0, 0.5, -20.0>
look_at <0.0, 0.0, 0.0>
}
light_source{<-30, 30, -30>,color rgb<1,1,1>}
// ----------------------------------------
#declare Roof = union{
#declare Rad = 1.5;
#declare D = Rad*2
#declare Circ = pi*D;
#declare Base = Circ/8;
#declare Height = -1;
#declare Peak = <0,0,0>;
#declare Pt1 = <-Base/2,Height,Rad>;
#declare Pt2 = <Base/2,Height,Rad>;
#declare Count = 0;
#declare Angle = 0;
#while(Count<8)
object{triangle{Pt1,Peak,Pt2
rotate y*Angle
}}
#declare Count = Count +1;
#declare Angle = Angle + 360/8;
#end
}
object {Roof pigment{White}}
Post a reply to this message
|
|
|
|
There's really no need for formulas... let POV do the work:
#local dTheta = 45;
#local Pt1 = vrotate(<0, Height, Rad>, dTheta/2 * y);
#local Pt2 = <-1, 1, 1> * Pt1;
#local Roof =
union {
#local T = 0;
#while (T < 360)
triangle {
Pt1,
0,
Pt2
rotate T * y
}
#declare T = T + dTheta;
#end
}
>> #declare Pt1 = <-Base/2,Height,Rad>;
>> #declare Pt2 = <Base/2,Height,Rad>;
> #declare Base = Circ/8;
> #declare Base = 2*Rad*tan(pi/8);
--
http://www.flash.net/~djconnel/
Post a reply to this message
|
|