POV-Ray : Newsgroups : povray.advanced-users : a math question Server Time
23 Dec 2024 22:28:18 EST (-0500)
  a math question (Message 1 to 3 of 3)  
From: Randolph Robnett
Subject: a math question
Date: 11 Dec 2000 16:20:40
Message: <3a354528$1@news.povray.org>
First let me thank everyone for there response to my question about making
water look as if it is funneling.
Lots of good ideas. Not having ever tried isosurfaces before, I am finding
this very interesting. So on with my question.
  I hope I am explaining this question correctly.
  I remember, way back in my days of algebra and trig, there being a
function 1/x that when plotted on an 'XY' coordinate would give you
something that looked like a funnel. Knowing these functions is there anyway
to use them in an isometric or maybe even a parametric surface. Maybe the
answer is in front of me and my math is just a little rusty, actually a
whole lot rusty
  Once again I thank you for your help and knowledge


Post a reply to this message

From: Christoph Hormann
Subject: Re: a math question
Date: 11 Dec 2000 16:52:37
Message: <3A354CA0.80CA8788@gmx.de>
Randolph Robnett wrote:
> 
>   I hope I am explaining this question correctly.
>   I remember, way back in my days of algebra and trig, there being a
> function 1/x that when plotted on an 'XY' coordinate would give you
> something that looked like a funnel. Knowing these functions is there anyway
> to use them in an isometric or maybe even a parametric surface. Maybe the
> answer is in front of me and my math is just a little rusty, actually a
> whole lot rusty
>   Once again I thank you for your help and knowledge

how about:

function { y + ( 1 / sqrt(x^2 + z^2 + 0.01) ) }

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Chris Huff
Subject: Re: a math question
Date: 11 Dec 2000 18:10:26
Message: <chrishuff-D01AD4.18112011122000@news.povray.org>
In article <3A354CA0.80CA8788@gmx.de>, Christoph Hormann 
<chr### [at] gmxde> wrote:

> how about:
> function { y + ( 1 / sqrt(x^2 + z^2 + 0.01) ) }

Some comments: the "+ 0.01" part is to avoid an artifact along the 
y-axis, I use this value in my function to control the shape of the 
isosurface and depth of the whirlpool.
You might want to use "sqr(x)" instead of "x^2", it may be slightly 
faster.
This is the isosurface I have come up with:

#declare Vortex =
function {
    1/(sqr(x)+sqr(z)+0.3) + sin(atan2(x,z)*7 + y*10)*0.025
}
isosurface {
    function {y+Vortex(x,y,z)}
    threshold 0
    accuracy 0.01
    max_gradient 3.9
    contained_by {box {<-25,-4.99,-25>, < 25, 0.01, 25>}}
    texture {
        pigment {color rgb < 0.5, 0.85, 1>}
        finish {
            specular 1 roughness 0.0025
        }
    }
}

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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