|
![](/i/fill.gif) |
I need a bit of advice.
I try to model the top end of the flutes on a column shaft. It should end
with a hemispherical feature. However, as you can see on the image, the
sphere used is much too large, although I thought I coded its size
correctly. Undoubtedly, I overlooked something.
I add the code below:
//=== start code ===
#declare f_basic = function {pow(x,2) + pow(y,2) + pow(z,2) - 1}
#declare f_flute = function {f_basic((x-1)*10, 0, z*10)}
#declare f_flutebase = function {(x-1)+(y-0.2)}
#declare f_flutetop = function {y-0.8}
#declare f_flutend = function {f_sphere((x-1), (y-0.8), z, 0.1)}
#declare f_hole = function {max((y*y-1),(x*x-1),(z*z-1))}
#declare Roughness = 0.2;
#declare f_rough = function {f_wrinkles(x*Roughness, y*Roughness,
z*Roughness)}
#macro ColSegment(Flutes,Fbase,Ftop)
#local Angle = 0;
isosurface {
function {max(
max(f_basic(x, 0, z),
-f_hole(y,x*8,z*8),
-f_hole(y-10,x*8,z*8)
#if (Flutes)
#while (Angle<365)
,
#if (Fbase)
-max(f_flute(x*cos(radians(Angle)) -
z*sin(radians(Angle)), 0, x*sin(radians(Angle)) +
z*cos(radians(Angle))), -f_flutebase(x*cos(radians(Angle)) -
z*sin(radians(Angle)), y, x*sin(radians(Angle)) + z*cos(radians(Angle))))
#else
#if (Ftop)
-max(f_flute(x*cos(radians(Angle)) -
z*sin(radians(Angle)), 0, x*sin(radians(Angle)) + z*cos(radians(Angle))),
f_flutetop(x*cos(radians(Angle)) - z*sin(radians(Angle)), y,
x*sin(radians(Angle)) + z*cos(radians(Angle)))),
-(f_flutend(x*cos(radians(Angle)) -
z*sin(radians(Angle)), y, x*sin(radians(Angle)) + z*cos(radians(Angle))))
#else
-(f_flute(x*cos(radians(Angle)) -
z*sin(radians(Angle)), 0, x*sin(radians(Angle)) + z*cos(radians(Angle))))
#end
#end
#local Angle = Angle+15;
#end //of Angle
#end //of flutes
) //end of max()
+ f_rough(x, y, z)
,
(f_sphere(x/2.5,y-0.5,z/2.5, 0.61)
+ f_snoise3d(x,y,z)*0.1)
) //end of max()
} //end of function
max_gradient 50.0
contained_by {box {<-1.1, 0, -1.1>, < 1.1, 1, 1.1>}}
accuracy 1e-3
}
#end //of macro
object {ColSegment(1,0,1)}
//=== end code ===
Thomas
Post a reply to this message
Attachments:
Download 'WeatheredColumn3_test.jpg' (13 KB)
Preview of image 'WeatheredColumn3_test.jpg'
![WeatheredColumn3_test.jpg](/povray.binaries.images/attachment/%3C47c6a4a4%40news.povray.org%3E/WeatheredColumn3_test.jpg?preview=1)
|
![](/i/fill.gif) |