|
|
subject in pov-ray.general
#macro Half_Rounded_Cylinder(Lenght,Radius,Hollow_Radius)
union {
// the hollow cilinder
difference {
union {
cylinder {<-Lenght/2,0,0>,<Lenght/2,0,0>,Radius}
sphere {<-Lenght/2,0,0>,Radius}
sphere {< Lenght/2,0,0>,Radius}
}
cylinder {<-Lenght/2,0,0>,<Lenght/2,0,0>,Hollow_Radius}
sphere {<-Lenght/2,0,0>,Hollow_Radius}
sphere {< Lenght/2,0,0>,Hollow_Radius}
plane {-y,0}
}
// rounded borders
cylinder {<-Lenght/2,0,Hollow_Radius+((Radius-Hollow_Radius)*.5)>,
<Lenght/2,0,Hollow_Radius+((Radius-Hollow_Radius)*.5)>,
(Radius-Hollow_Radius)/2}
cylinder {<-Lenght/2,0,-Hollow_Radius-((Radius-Hollow_Radius)*.5)>,
<Lenght/2,0,-Hollow_Radius-((Radius-Hollow_Radius)*.5)>,
(Radius-Hollow_Radius)/2}
difference {
union {
torus
{Hollow_Radius+((Radius-Hollow_Radius)*.5),(Radius-Hollow_Radius)*.5 translate
-x*Lenght/2}
torus
{Hollow_Radius+((Radius-Hollow_Radius)*.5),(Radius-Hollow_Radius)*.5 translate
x*Lenght/2}
}
cylinder {<-Lenght/2,0,0>,<Lenght/2,0,0>,Radius}
} // end of torii csg
pigment {Tan}
finish {phong .6 reflection .1}
}
#end
object { Half_Rounded_Cylinder(4,1.5,1.2) translate y*1.33 rotate y*-25}
Post a reply to this message
Attachments:
Download 'rounded_cylinder.jpg' (58 KB)
Preview of image 'rounded_cylinder.jpg'
|
|