|
|
Wasn't it John M. Dlugosz who wrote:
>What's a good way to make a wicker basket model, using what's available in
>base plus MegaPOV?
Here's something that almost works:-
Take the built in "mesh1" isosurface function and add it to a cylinder.
From some viewpoints, the result looks fairly convincing, and it's quite
quick.
To get it right, you really need to bend the mesh round the cylinder,
but I'm not sure how to do that.
#version unofficial MegaPov 0.6;
camera { location <0, 0, -5> look_at <0, 0, 0>}
light_source {<-100,200,-100> colour rgb 1}
// Function for cylinder radius 1.0
#declare Cyl =function{(x^2 + z^2 - 1.0^2)}
// Built in mesh1 function
#declare Mesh = function {"mesh1" <1,0.2,1,0.1,2>}
// Swap the z and y coordinates of the mesh to make it vertical
// and apply a threshold (cotrols the fatness of the weave)
#declare Mesh2 = function {(Mesh(x,z,y) - 0.08)}
// Scale the mesh by <1/5,1/5,1> and add 0.3 of it
// to the cylindrical surface
isosurface {
function (Cyl(x,y,z)
+ Mesh2(5*x,5*y,z)*0.3)
method 2
eval
accuracy 0.001
contained_by{sphere{0,2}}
pigment {rgb <1,1,.6>}
}
Post a reply to this message
|
|