|
|
"yesbird" <nomail@nomail> wrote:
> Hi,
>
> Can anybody explain me, please, how 'isosurface' works ?
> I am trying to render:
>
> V = cos(x) + cos(y) + cos(z); // Attached
So, IIRC that's like a gyroid or something...
If you email me, I can can send you a PDF copy of Mike Williams' Isosurface
Tutorial.
But the key idea is that it's an ISOsurface.
Very often what you need to do is subtract your function result from a space
coordinate so that when the function's surface point is AT that space point, the
result is zero - or whatever you set your threshold to.
After a few quick experiments, I established that you like want to "check" the
distance of your curve from a sphere, so I used that. You can probably use the
in-built f_sphere as well.
So try:
camp (7,0,-7, 0,0.3,0, 55)
//------------- Objects --------------------------------------------
//
// FUnction
//
// #declare f = function { f_sphere(x,y,z,0.8) - pow(f_noise3d(x,y,z),2) } // Ok
#declare f = function { cos(x) + cos(y) + cos(z) } // Not displayed (?)
//
// Surface
//
#declare R = 1;
isosurface {
function { sqrt (x*x+y*y+z*z)/8 - f(x, y, z)}
threshold 0
accuracy 0.0001
max_gradient 1.6
open
contained_by {box {-4, +4}}
pigment { rgbft <0,0.5,0,0.6,0>
scale 2
translate 1}
}
Post a reply to this message
Attachments:
Download 'isosurfacetest1.png' (64 KB)
Preview of image 'isosurfacetest1.png'
|
|