POV-Ray : Newsgroups : povray.binaries.images : Isosurface approximation MkIII : Re: Isosurface approximation MkIII Server Time
15 Nov 2024 12:15:38 EST (-0500)
  Re: Isosurface approximation MkIII  
From: Jaap Frank
Date: 6 Jul 2003 15:07:09
Message: <3f08735d$1@news.povray.org>
"Kevin Loney" <kev### [at] ekoikcom> wrote in message news:3f012665@news.povray.org...
> ok I finally finished this and it's relativly fast as well. there are
> a couple of modifications however but they can wait, in the mean time it can
> be downloaded from
> http://www.geocities.com/qsquared_1999/pubfiles/pubfiles.html if anyone is
> interested.
>
> approximation.jpg took 7s to render
> real.jpg took 50s to render
>
> f = function(x,y,z) {
>     f_sphere(x,y,z,1)+f_wrinkles(x,y,z)
> }
>

This is great! Thank you for your work.
I've immediately tried it, but the parsing of the <80,80,80> example took my old
computer so long that I decided to see if it could be made faster.
I was surprised that 'if statements' were slowing down the parsing considerable so
I've changed them if possible (gain of about 10%).
I've changed the calls to 'math.inc' for the smooth triangles into functions. That
gave
a considerable improvement in time again (now 22%).
The interpolation macro is changed into direct code (slight improvement: now 27%).
The major change is in the calculation of the vertex function values of the grid
cells.
In the original file all vertices are calculated for every grid cell, but that
means that
the values for inside grid cells are calculated eight times for the same
X,Y,Z-point.
I've changed this in two YZplane arrays and transfer the data from the right
YZplane
to the left YZplane if 'X' is increased with 'xstep'. Although the overhead is
greater,
there is a light improvement in speed, but I think that it will be considerable if
the
isofunctions become complicated.
I've made a switch  named OLD to compare both include files in the '.pov' file, so
you can compare the results. For me the total improvement was 37.5%.

Jaap Frank


Post a reply to this message

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