POV-Ray : Newsgroups : povray.unofficial.patches : Isosurface feature request : Re: Isosurface feature request Server Time
2 Sep 2024 14:16:57 EDT (-0400)
  Re: Isosurface feature request  
From: Matthew Corey Brown - XenoArch
Date: 1 Jan 2000 20:04:09
Message: <386EA3D7.1A53D563@xenoarch.com>
Chris Huff wrote:
> 
> In article <386E7D29.2BAD5F3B@xenoarch.com>, Matthew Corey Brown
> <mcb### [at] xenoarchcom> wrote:
> > so depending on how much turbulence and which pattern you gain 
> > anywhere
> > from 0.01% to 50% gain, the 50% gain is if you use gradient with
> > no turbulence, might as well use y-floor(y) and possibly get an even
> > faster speed gain. but i would stay 99% of the functions the speed
> > gain would be less then %1
> 
> Hmm, are you sure the numbers would be that small? Per call, perhaps,
> but how many times are those functions used? I suppose the only way to
> get a real answer would be to add the function and run some tests. Does
> anyone have some hints on adding an isosurface function?
> 
Not 100% sure but close, noise and especially turbulence has
over a hundred operands a piece (as turbulence calls noise a couple of
times)

yes there is an array in iso_func.c with a string and the function name,

the parse function calls a lookup function to put a pointer to the
function into the function data struct, do a search on isopigment of the
source, its been a year since i wrote it heh, maybe one of the other
patchers that have added more functions then I could correct me and add
the missing data.

> > note on precision: colors do use floats, but some compilers reduce
> > doubles
> > to floats when they are told todo fast math, personally i compile
> > without fast math.
> 
> Well, when I said that, I was thinking about the precision of the color
> blending code, which I don't understand at all.
> 
Basically it does this 
T=eval_pattern
CM[x] < T > CM[x+1] (finding x is fast if you have a color map with 2
entries ie {[0 rgb 0][1 rgb 1]} )

rat = (T-CM[x])/(CM[x+1]-CM[x])
then Color=Color[x]*(1-rat)+Color[x+1]*rat

umm i wish i could put it in english but it does a weighted average of
the colors, based on distance of T from the closest entries on the color
map.

A rule of thumb on precsion from basic science lab classes:
The precsion of your final value is the precsion of the coursest data
point.. ie in base 10
2.05 * 1.00000345 = 2.05

but floats are done in binary so its binarary precsion and not decimal
precsion as is done in science. So since the data uses floats or higher
and its all floating point code then the precsion is float.. the color
itself.

> --
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.