POV-Ray : Newsgroups : povray.newusers : Distorted isosurface Server Time
25 Nov 2024 17:28:11 EST (-0500)
  Distorted isosurface (Message 1 to 2 of 2)  
From: Ryan Twitchell
Subject: Distorted isosurface
Date: 30 Apr 2005 01:57:22
Message: <42731e42$1@news.povray.org>
Hi,
	The following code creates a spiral that starts out at y = 0 at the 
outer radius and gains height (y) as the radius decreases. Can anyone 
suggest a way to do this without distorting the cross-section radius of 
the spiral in the y direction? I'm also having trouble getting it into 
an upside-down funnel shape that falls off the way I want it to (raising 
it more just in the center).

isosurface {
  #declare F = function { f_spiral(x, y, z, 0.5, 0.05, 3, -0, -0, 1) }
  function { F(x, y-1/f_r(x, y/8, z), z) }
  contained_by { box { -4, 4 } }
  max_gradient 10
  pigment { rgb<1, 0, 0> }
}

Any help would be greatly appreciated,
Ryan


Post a reply to this message

From: Mike Williams
Subject: Re: Distorted isosurface
Date: 30 Apr 2005 15:50:45
Message: <5IcCcFA$E+cCFw1l@econym.demon.co.uk>
Wasn't it Ryan Twitchell who wrote:
>Hi,
>       The following code creates a spiral that starts out at y = 0 at the 
>outer radius and gains height (y) as the radius decreases. Can anyone 
>suggest a way to do this without distorting the cross-section radius of 
>the spiral in the y direction? I'm also having trouble getting it into 
>an upside-down funnel shape that falls off the way I want it to (raising 
>it more just in the center).
>
>isosurface {
>  #declare F = function { f_spiral(x, y, z, 0.5, 0.05, 3, -0, -0, 1) }
>  function { F(x, y-1/f_r(x, y/8, z), z) }
>  contained_by { box { -4, 4 } }
>  max_gradient 10
>  pigment { rgb<1, 0, 0> }
>}

I'm fairly sure that you can't get there staring from f_spiral - it
always seems to distort the cross section when you do this sort of
thing.

I've so far not managed to find any other isosurface approach that
doesn't suffer from similar problems, so I suggest using a sphere sweep.
Unfortunately, it's slower than the isosurface you started with.

// Control parameters
#declare r_step=0.01;       // Smaller for greater accuracy
#declare a_step=70*r_step;  // Larger for more coils
#declare Thickness=0.02;    // Larger for fatter lines    
#declare Steepness=4.5;     // larger for raising more in the centre
#declare Height=0.5;        // max height

#declare r=1;
#declare A=0;

sphere_sweep {
  b_spline
  r/r_step
  #while (r>0)
    ,<r*cos(A), pow(1-r,Steepness)*Height ,r*sin(A)>,Thickness
    #declare A=A+a_step;
    #declare r=r-r_step;
  #end
  pigment {rgb x}
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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