|
|
I used metallographic techniques to determine the volume fraction of
space which is filled by the surface. The nonzero volume fraction at a
threshold of zero explains the plateaus we saw in the Mega 0.0-0.4
noise3d function.
I ran the same file in both Mega 0.4 and Mega 0.5.
Note that simply switching the version statement in Mega 0.5 did not
give me the old noise3d function. Thus, the "original" noise3d is lost
in version 0.5.
#version unofficial MegaPov 0.4; /0.5;
#include "colors.inc"
#include "textures.inc"
#include "stones.inc"
#include "metals.inc"
camera{
location <0,40,-27.5>
look_at 0 // <9,24,2>
angle 25
}
background {White}
light_source {<0, 390, 0> color White}
#declare rag=.01;
#declare threshy=0;
#while (threshy<1)
#declare B=
isosurface{
function{ noise3d(x/rag,y/rag,z/rag)}//&(y-.00001)&(-y-.001)}
accuracy .001
threshold threshy // .40 // 8
contained_by { box{<-10,0,-10>,<10,0.00001,10>} }
bounded_by { box{-10,10} }
pigment{Red + Green/2.5}
finish{ambient 0.15}
}
#declare minxyz=<-10,0,-10>;// +<min_extent(B);
#declare maxxyz=<10,0,10>;// +max_extent(B);
#declare nnxmax=60;
#declare nnzmax=nnxmax;
#declare nymin=100000;
#declare numsects=0;
#declare nnx=0;
#declare nnz=0;
#while(nnx<nnxmax)
#while(nnz<nnzmax)
#declare testy=<0,0,0>;
#declare Norm=<0,0,0>;
#declare
trial=trace(B,<minxyz.x+(maxxyz.x-minxyz.x)/nnxmax*nnx,-1000,minxyz.z+(maxxyz.z-minxyz.z)/nnzmax*nnz>,y,Norm);
#if (Norm.x = 0 & Norm.y = 0 & Norm.z = 0)
//we found an open path!
#else
#declare numsects=numsects+1; //nymin=trial.y;
#end
#declare nnz=nnz+1;
#end
#declare nnz=0;
#declare nnx=nnx+1;
#end
//#debug "\n"
#debug str(threshy,5,3)
#debug " "
#debug str(numsects/nnzmax/nnzmax,5,4)
#debug "\n"
#declare threshy=threshy+0.025;
//nnxmax=nnxmax+1;
#end
object {B}
Post a reply to this message
Attachments:
Download 'noise3d.jpg' (39 KB)
Preview of image 'noise3d.jpg'
|
|