|
|
Hello,
I have problems drawing the 0-isosurface of a function f which I know
discrete values stored in a 3D array. I managed to write some c file that
convert the data (approx 100x100x100) I have into a df3 file. I am using
povray 3.6
Let's say f = (x-0.5)^2 + (y-0.5)^2 + (z-0.5)^2 - 0.1, I tried the following
1/ If I directly use the value of f for 0<x,y,z<1 in the df3 file nothing
appears.
2/ If I store 1 for (x,y,z) such that f<0 and otherwise in the df3 file,
povray draws (as expected) a jagged sphere.
I would like to know why method 1 doesn't work properly. Method 2 is ok but
the surfaces are not smooth enough. I thought using a smoother function
(method 1) would help getting smoother isosurface but it look I got
something wrong.
Clue 1: has it to do with the facts density is supposed to be 0 outside of
the unit cube when using density file?
Below are the sdl lines I wrote for this.
#declare f=function{
pattern{ density_file df3 myfile.df3 }
}
#declare mysurface=isosurface {
function { f(x,y,z)}
contained_by {box {<0,0,0>, <1,1,1>} }
}
Post a reply to this message
|
|