POV-Ray : Newsgroups : povray.unofficial.patches : mega-newbie seeks mega-clue Server Time
1 Sep 2024 22:19:19 EDT (-0400)
  mega-newbie seeks mega-clue (Message 1 to 4 of 4)  
From: Anton Sherwood
Subject: mega-newbie seeks mega-clue
Date: 19 Aug 2000 15:24:12
Message: <399EE07F.65720247@pobox.com>
Why does this show nothing?


#declare PigFun = function {
                pigment {
                        granite
                        color_map { [0 rgb 0] [1 rgb 1] }
                        }
                }

isosurface {
        function { -PigFun + (sqr(x)+sqr(y)+sqr(z)) }
        contained_by { sphere { 0,2 }}
        pigment { rgb 1 }
        }


-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Chris Huff
Subject: Re: mega-newbie seeks mega-clue
Date: 19 Aug 2000 17:50:37
Message: <chrishuff-45555B.16515619082000@news.povray.org>
In article <399EE07F.65720247@pobox.com>, Anton Sherwood 
<bro### [at] poboxcom> wrote:

> Why does this show nothing?

You don't specify a threshold, so it defaults to 0. Your function only 
evaluates to 0 at a few points(if it ever does), so surfaces are found. 
Try using a threshold of 0.5 for some results.

isosurface {
    function {sqr(x) + sqr(y) + sqr(z) - PigFun(x,y,z)}
    threshold 0.5
    contained_by {sphere {0, 2}}
    pigment {rgb 1}
}

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

From: Anton Sherwood
Subject: Re: mega-newbie seeks mega-clue
Date: 20 Aug 2000 12:56:54
Message: <39A00F7A.546A262F@pobox.com>
> Anton Sherwood <bro### [at] poboxcom> wrote:
> > Why does this show nothing?

Chris Huff wrote:
> You don't specify a threshold, so it defaults to 0. Your function only
> evaluates to 0 at a few points(if it ever does),

Eh?  -PigFun + r^2 ought to be negative somewhere within the unit
sphere.

> so [no] surfaces are found.
> Try using a threshold of 0.5 for some results.

Okay.

Why does this show nothing?

#declare PigFun = function {
                pigment {
                        granite
                        color_map { [0 rgb 0] [1 rgb 1] }
                        }
                }

isosurface {
        function { -PigFun + (sqr(x)+sqr(y)+sqr(z)) }
        threshold 0.5				// likewise 1
        contained_by { sphere { 0,2 }}
        pigment { rgb 1 }
        }

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Chris Huff
Subject: Re: mega-newbie seeks mega-clue
Date: 20 Aug 2000 14:23:22
Message: <chrishuff-0DE140.13244120082000@news.povray.org>
In article <39A00F7A.546A262F@pobox.com>, Anton Sherwood 
<bro### [at] poboxcom> wrote:

> Eh?  -PigFun + r^2 ought to be negative somewhere within the unit
> sphere.

Er, you are right, of course...for some reason I was adding, not 
subtracting. Oops.
Try specifying a max_gradient or eval. Sometimes this is necessary to 
get a correctly rendering surface. And you might want to try "function { 
-PigFun + sqrt(sqr(x)+sqr(y)+sqr(z)) }", so it falls off linearly from 
the center.

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