|
|
What about the f_helix2 "isosurface by function" in the drop-down POV-Ray Insert
Menu?
I'm constantly amazed by how much good stuff is in there that I overlook or
forget is there!
isosurface { //-------------------------------------------------------------
function{
f_helix2(
x,y,z,
0, // not used,
12, // period, turns on the length of 2*pi
0.38, // minor radius,
0.50, // major radius,
0, // not used,
0.5, // cross section type, (0.0 to 1.0 = square ... rounded to circle
// over 2.0 to 3.0 = rounded to diamond and
concave diamond
0 // cross section rotation angle
)
}
contained_by {box {<-1,-1,-1>,<1,1,1>}}
max_gradient 8
texture{ pigment{ color rgb <1,1,1>*1.1}
finish { specular 0.4 phong 0.7 }
}
scale 0.9
rotate<0,0,0>
translate< 0,1.2,0>
} // end of isosurface -------------------------------------------------------
Post a reply to this message
Attachments:
Download '55 - isosurface f_helix2.jpg' (6 KB)
Preview of image '55 - isosurface f_helix2.jpg'
|
|
|
|
On 25-10-2014 16:03, Bald Eagle wrote:
> What about the f_helix2 "isosurface by function" in the drop-down POV-Ray Insert
> Menu?
> I'm constantly amazed by how much good stuff is in there that I overlook or
> forget is there!
I tried that first (obviously) but in the end I found the results less
'reliable' even than with f_helix1.
I finished the construction with some parameters the user can change,
and added the 'infinity':
//---------------------------------------------------------------------------
#include "functions.inc"
#declare Thickness = 0.02; //thickness of floors & ramps
#declare Height = 0.5; //distance between floor levels
#declare Level =
union {
difference {
cylinder {
<0,0,0>,<0,Thickness,0>, 1.00
}
#local Prism =
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
object {Prism
rotate (180+27)*y
}
object {Prism
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 appoximate number of desired triangles in the mesh.
#local Ramp =
object {
// U, V, length, radius, coils, rez
Spring (Thickness, 0.5, Height, 1.0, 0.5, 5000)
rotate 90*z
}
object {Ramp
rotate 90*y
}
object {Ramp
rotate -90*y
}
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} }
}
} //end of union
#declare N=1;
union {
object {Level}
#for (N,1,100)
object {Level
rotate -54*y*N
translate (Height-Thickness)*y*N
}
#end
rotate 160*y
}
//---------------------------------------------------------------------------
Thomas
Post a reply to this message
|
|