| 
  | 
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 
 | 
  |