|
|
On 24-10-2014 16:38, Thomas de Groot wrote:
> The most difficult to control imo is the isosurface. Some more
> documentation in addition to the POV-Ray docs and Mike Williams'
> explanation (http://www.econym.demon.co.uk/isotut/builtin1.htm) would be
> welcome in fact.
Much easier is using Tim Attwood's spring.inc macro, to be found in the
Object Collection.
//---------------------------------------------------------------------------
#include "functions.inc"
union {
difference {
cylinder {
<0,0,0>,<0,0.10,0>, 1.00
scale <1,1,1> rotate<0,0,0> translate<0,0,0>
}
difference {
prism {
-0.01, 0.11, 4
<-0.50, 0.00>, // first point
< 0.50, 0.00>,
< 0.00,-1.00>,
<-0.50, 0.00> // last point = first point !!!
scale <1.00, 1.00, 1.00>
rotate <0,0,0>
translate <0.00, 0.00, 1.00>
}
cylinder {
<0,-0.2,0>,<0,0.12,0>, 0.50
scale <1,1,1> rotate<0,0,0> translate<0,0,0>
}
} //end of difference
rotate 27*y
} //end of difference
#include "spring.inc"
// The spring is created with it's base on the origin, oriented on
the +X axis
// U and V are the rectangular width and height of the spring wire
// X_Length is the overall length of the spring
// Radius is the radius of the spring
// Coils is the number of turns the spring makes (fractional numbers
are OK)
// Rez is the approximate number of desired triangles in the mesh.
object {
// U, V, length, radius, coils, rez
Spring (0.1, 0.5, 1, 1.0, 0.5, 5000)
/*texture {
pigment {color rgb <1,1,0.2> }
normal {bumps 0.1 scale <0.005,0.005,0.005>}
finish { phong 0.5 reflection{ 0.00 metallic 0.00} }
}*/
rotate 90*z
rotate 90*y
translate <0,0,0>
}
texture {
pigment {color rgb <1,1,0.8> }
normal {bumps 0.1 scale <0.005,0.005,0.005>}
finish { phong 0.5 reflection{ 0.00 metallic 0.00} }
}
rotate 160*y
} //end of union
//---------------------------------------------------------------------------
Thomas
Post a reply to this message
|
|