POV-Ray : Newsgroups : povray.advanced-users : Isosurface question : Re: Isosurface question Server Time
28 Jul 2024 18:23:48 EDT (-0400)
  Re: Isosurface question  
From: Tor Olav Kristensen
Date: 21 Jul 2004 08:42:52
Message: <40fe64cc$1@news.povray.org>
Andrew C on Mozilla wrote:
> 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??

Yes. I once presented a solution to this.

It's halfway down in this message:

http://tinyurl.com/3f642
http://news.povray.org/povray.text.scene-files/message/%3C3fbe6e34%40news.povray.org%3E/#%3C3fbe6e34%40news.povray.org%3E
"My favourite isosurface (see p.b.i. for image)", 21. Nov. 2003


There's source code and more information in the rest of that thread:

http://tinyurl.com/6glf6
http://news.povray.org/povray.text.scene-files/thread/%3Cweb.3fbbe555cd7b5c811235fd70%40news.povray.org%3E
Started by Alex Kluchikov 19. Nov. 2003

-- 
Tor Olav
http://subcube.net
http://subcube.com


Post a reply to this message

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