|
![](/i/fill.gif) |
Wasn't it mephuser who wrote:
>Need help with Isosurface and Predefined Shapes Code Conversion
>//Predefined Shape Code
>cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215}
>// What does <0,-0.5,0> mean?
>// What does 0.215 mean?
Try running the following complete scene
The red cylinder is a cylinder.
The green cylinder is an isosurface.
The blue spheres are placed at points <0,-0.5,0> and <0,0.5,0> so you
can see how they relate to the cylinder.
The yellow bar is 0.215 units long, so you can see how that relates to
the cylinder.
global_settings {assumed_gamma 1.0}
camera { location <0.3, 0, -5> look_at <0.3, 0, 0> angle 20}
background {rgb 1}
light_source {<-100,200,-100> colour rgb 1}
cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215
pigment {rgb <1,0,0>}
}
isosurface {
function { x*x + z*z - 0.215*0.215 }
max_gradient 0.7
contained_by {box {<-.3,-.5,-.3><.3,.5,.3>}}
pigment {rgb <0,1,0>}
translate x*0.6
}
sphere {<0,-0.5,0>,0.04 pigment {rgb <0,0,1>}}
sphere {<0, 0.5,0>,0.04 pigment {rgb <0,0,1>}}
cylinder {<0,0.55,0><0.215,0.55,0>,0.02 pigment {rgb <1,1,0>}}
Post a reply to this message
|
![](/i/fill.gif) |