POV-Ray : Newsgroups : povray.unofficial.patches : Isoblob patch beta : Re: Isoblob patch beta Server Time
3 Sep 2024 02:16:58 EDT (-0400)
  Re: Isoblob patch beta  
From: Ron Parker
Date: 5 Aug 1999 12:50:25
Message: <37a9c0d1@news.povray.org>
On Thu, 05 Aug 1999 12:21:37 -0400, Lummox JR wrote:
>BTW, I'd like to see the new isosurface files if possible; an addition
>of r, theta, and phi will likely force some modifications to my
>function-normal code.

You can get them from R. Suzuki's website if you really want them.
I'm not sure what effects it will have on you, though.  The changes
seem to be limited to isofunc.c and are in the form of new internal
functions:

static DBL R(FUNCTION *Func,VECTOR XYZ)
{
   return( sqrt(x*x + y*y + z*z ) );  
}

static DBL TH(FUNCTION *Func,VECTOR XYZ)
{
   return( atan2(x,z) );  
}

static DBL PH(FUNCTION *Func,VECTOR XYZ)
{
   return( atan2(sqrt(x*x + z*z ),y) );  
}

These functions are then added to the function table and used thusly:
(this example was taken from R. Suzuki's site and modified to actually 
render.  He seems to have made the (x,y,z) optional in his version, but 
I can't see where he did it, and my code is too much unlike his to do 
much in the way of diffs anymore.)

#declare TH=function{"TH"}
#declare R=function{"R"}
#declare PH=function{"PH"}

isosurface {
    function{cos(TH(x,y,z)*7)*0.2+min(abs(R(x,y,z)-1.5),abs(R(x,y,z)-3))+y*y}
    bounded_by{ box {<-3.7, -0.5, -3.7>, <3.7, 0.5, 3.7>}}
    threshold    0.5 
    accuracy 0.02
    max_gradient 1.7
    pigment {colour <0.8,0.5,0.2>}
    finish {ambient 0.2 phong 0.2}
    scale <1.25,1,1.25>
}


Post a reply to this message

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