|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Is there anyway, when using iso-surfaces, of returning the max and min
values of the surface for y?
For example, if creating a turbulent sea (!) how would I easily find out
what the highest wave peak was and the lowest trough?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tom Melly <tom### [at] tomandluf9couk> wrote:
: Is there anyway, when using iso-surfaces, of returning the max and min
: values of the surface for y?
For many function this can be analytically impossible to calculate. You
can try to approximate with some stochastic algorithm.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Warp" <war### [at] tagpovrayorg> wrote in message
news:39805cf5@news.povray.org...
> Tom Melly <tom### [at] tomandluf9couk> wrote:
> : Is there anyway, when using iso-surfaces, of returning the max and min
> : values of the surface for y?
>
> For many function this can be analytically impossible to calculate.
So what is POV doing? Does it calculate the surface in some way that doesn't
depend on "knowing" where the surface is?
> You
> can try to approximate with some stochastic algorithm.
>
Well, you could. Meanwhile, I'll go and look up "stochastic" in the
dictionary.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tom Melly <tom### [at] tomandluf9couk> wrote:
:> For many function this can be analytically impossible to calculate.
: So what is POV doing? Does it calculate the surface in some way that doesn't
: depend on "knowing" where the surface is?
Povray uses a stochastic algorithm, ie. it takes many samples and tries
to approximate the right value. It will seldom hit the mathematically exact
value.
(This as far as I have understood correctly the isosurface raytracing.)
:> You
:> can try to approximate with some stochastic algorithm.
: Well, you could. Meanwhile, I'll go and look up "stochastic" in the
: dictionary.
Stochastic (AFAIK) is a method of taking many samples and searching the
correct value this way. Povray's radiosity uses this kind of technique.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 27 Jul 2000 12:26:59 -0400, Warp wrote:
>Tom Melly <tom### [at] tomandluf9couk> wrote:
>:> For many function this can be analytically impossible to calculate.
>
>: So what is POV doing? Does it calculate the surface in some way that doesn't
>: depend on "knowing" where the surface is?
>
> Povray uses a stochastic algorithm, ie. it takes many samples and tries
>to approximate the right value. It will seldom hit the mathematically exact
>value.
> (This as far as I have understood correctly the isosurface raytracing.)
Well, it's not technically stochastic. Stochastic implies some degree of
(pseudo)randomness. POV (Well, MegaPOV, and future versions of POV) does
use a numerical algorithm, and thus is susceptible to error, but it's
deterministic and the error can be bounded to be as small as you want to,
within the limits of your machine's FP precision.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Tom Melly wrote:
> Is there anyway, when using iso-surfaces, of returning the max and min
> values of the surface for y?
In case you weren't able to decipher their answers, they mean the following.
(I have working code for this at home, this is from memory):
Assume your box is bounded by _/- x_extent, and _/- z_extent
#delcare ymin=1000000000;
#declare ymax=-1000000000;
#declare ysum=0;
#declare count=0;
#declare dx=0;
#declare dz=0;
#while(dx<100) // or any other big number
#while (dz<100) // or any other big number
#declare Norm=<0,0,0>;
#declare tracey=trace(Your_Iso_Object, < (dx-50)/50*x_extent,
10000000, (dx-50)/50*x_extent>, -y, Norm);
#if (Norm.x = 0 & Norm.y=0 & Norm.z = 0)
#debug "You tried to sample a point that is beyond the extent of
the surface, I'm quittin' >:-P"
#declare asdf=1/0;
#else
#if (tracey.y>ymax)
#declare ymax=tracey;
#end
#if (tracey.y<ymin)
#declare ymin=tracey.y;
#end
#declare ysum=ysum+tracey.y;
#declare count=count+1;
#end
#declare dz=dz+1;
#end
#declare dz=0;
#declare dx=dz+1;
#end
#declare yavg=ysum/count;
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" <gre### [at] my-dejanewscom> wrote in message
news:39858943.B02BF0E2@my-dejanews.com...
> Tom Melly wrote:
>
> > Is there anyway, when using iso-surfaces, of returning the max and min
> > values of the surface for y?
>
> In case you weren't able to decipher their answers, they mean the
following.
> (I have working code for this at home, this is from memory):
>
> <SNIP>
Ah, many thanks. I'll try it tonight. - so "stochastic" is just a posh word
for kludge? ;)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|