|
|
Wasn't it -KK- who wrote:
>I am trying to create a pillar with slightly rounded edges.
>Scene text below....
>However, the edges meting at the apex are not equally
>curved, and those joinig the 2 prisms are not curved at all.
>Can anyone help me?
>TIA
I think that those problems may be unavoidable as long as you are using
prisms. You could achieve the effect using cylinders and spheres to do
the rounding, something like this:-
global_settings{assumed_gamma 1.4}
#include "colors.inc"
camera {location <0,5,-10> look_at -y*.8 angle 12}
light_source{<-5,10,-10> colour White}
background{colour LightBlue}
#declare H=1; // Height of pyramidal section
#declare W=1; // Width
#declare B=0.2; // Height of base section
#declare R=0.05; // Roundness of edges
// Calculate the angle of the face, so we know how far to translate it
#declare Theta = atan2(H,W)+radians(90);
#declare Side = union {
cylinder {<W-R, 0, W-R> <0,H-R,0>, R} // sloping
cylinder {<W-R, 0, W-R> <R-W, 0, W-R> R} // horizontal
cylinder {<W-R, 0, W-R> <W-R, -B, W-R> R} // vertical
sphere {<W-R, 0, W-R>, R} // corner
box {<W-R,0,W-R*2> <R-W,-B,W>} // lower face
triangle {<W-R,0,W-R> <0,H-R,0> <R-W, 0, W-R> // sloping face
translate <0,R*sin(Theta),-R*cos(Theta)>
}
}
union {
object {Side}
object {Side rotate y*90}
object {Side rotate y*180}
object {Side rotate y*270}
sphere {<0,H-R,0>, R} // vertex
texture{
pigment{Yellow}
finish{specular 0.4}
}
translate -H*y
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|