Anonymous user
Draw a sphere: Difference between revisions
no edit summary
m (→{{header|TCL}}: Case problem) |
No edit summary |
||
Line 31:
[[Category:Geometric Primitives]]
=={{header|POVray}}==
This is what POVray was made for. An example with a sky, surface and transparency:
<lang POVray>
camera { location <0.0 , .8 ,-3.0> look_at 0}
light_source{< 3,3,-3> color rgb 1}
sky_sphere { pigment{ gradient <0,1,0> color_map {[0 color rgb <.2,.1,0>][.5 color rgb 1]} scale 2}}
plane {y,-2 pigment { hexagon color rgb .7 color rgb .5 color rgb .6 }}
sphere { 0,1
texture {
pigment{ color rgbft <.8,1,1,.4,.4> }
finish { phong 1 reflection {0.40 metallic 0.5} }
}
interior { ior 1.5}
}
</lang>
Yields this:
[[image:PovRay-sphere.jpg]]
=={{header|PureBasic}}==
3D Sphere animation.
Line 291 ⟶ 319:
<lang Tcl>
proc grey {n} {format "#%2.2x%2.2x%2.2x" $n $n $n}
Line 302 ⟶ 329:
}
</lang>
Results in this image:
[[image:Tcl-spheroid.gif]]
|