POV-Ray : Newsgroups : povray.advanced-users : Isosurface question : Isosurface question Server Time
28 Jul 2024 18:21:31 EDT (-0400)
  Isosurface question  
From: Andrew C on Mozilla
Date: 20 Jul 2004 16:31:23
Message: <40fd811b@news.povray.org>
Isosurfaces... wonderful things, aren't they?

At the present moment, I have one that's going increadibly slowly. 
That's probably because of the huge max_gradiant required to draw it. 
But it surely doesn't help that I have to explain the function I want 
POV-Ray to draw in a very inefficient way...

  * * *

Suppose I have a macro like this:

#macro Fn1(x, y, z)
   #declare A = sin(x) * cos(y) * tan(z);
   #declare B = sqrt(x*y / z);
   #declare C = exp(log(x)*y - z);

   (A*B - C)*(tan(A+B)-log(C))
#end

Now, suppose I wanted to draw an isosurface of that. (I completely made 
up the function - I imagine it's not very interesting to look at!) The 
only way I can think of to draw it is something like this:

#declare Fn1 =
{
   ( (sin(x) * cos(y) * tan(z))*sqrt(x*y / z) - exp(log(x)*y - z) ) * 
(tan(sin(x) * cos(y) * tan(z) + sqrt(x*y / z)) - log(exp(log(x)*y - z)) )
}

Notice how A, B and C have to be calculated *TWICE*...

Is there any way round this??

Andrew @ home.


Post a reply to this message

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