POV-Ray : Newsgroups : povray.advanced-users : Square roots of negative numbers in isosurfaces? Server Time
30 Jul 2024 10:24:41 EDT (-0400)
  Square roots of negative numbers in isosurfaces? (Message 11 to 20 of 26)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 6 Messages >>>
From: Chris Huff
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 14 Jan 2000 00:02:47
Message: <chrishuff_99-A0DA74.00030614012000@news.povray.org>
In article <387EA67E.7CE91E84@faricy.net>, David Fontaine 
<dav### [at] faricynet> wrote:

> What I think POV *should* do is not include these areas in the graph. Say 
> I
> want to graph a hemisphere on my TI-89, I do x^2+y^2+z^2=1, 
> z^2=-x^2-y^2+1,
> z=sqrt(1-x^2-y^2), and graph it and it gives me my hemisphere, and the 
> area
> *outside* the hemisphere is ignored (not rendered) because it is 
> sqrt(neg).
> Because if people want it to work the other way they can always just make
> it sqrt(abs(x)) instead of sqrt(x).

I think this might be difficult to do, because the isosurface is solved 
by sampling the function at different points. I don't see how it could 
be done.
Then again, it is after midnight now, it is probably just that I am 
tired and not thinking straight.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 14 Jan 2000 17:10:49
Message: <387F9E1B.F3DF1811@my-dejanews.com>
But the point is that pov is doing SOMETHING.  If it finds a definite
isosurface for a mathematically undefined region of space, then povray is in
reality not computing the given function, but converting it to some defined
function. Or there is an error in how it has defined some functions.

perhaps
    x^a = sign(x)^int(a) * abs(x)^a

because
    noise3d(x^3.1, y, z)
gives "something" for negative values of x !

I'm not complaining as much as striving to solve the mystery . . .
Chris Huff wrote:

> In article <387EA67E.7CE91E84@faricy.net>, David Fontaine
> <dav### [at] faricynet> wrote:
>
> > What I think POV *should* do is not include these areas in the graph. Say
> > I
> > want to graph a hemisphere on my TI-89, I do x^2+y^2+z^2=1,
> > z^2=-x^2-y^2+1,
> > z=sqrt(1-x^2-y^2), and graph it and it gives me my hemisphere, and the
> > area
> > *outside* the hemisphere is ignored (not rendered) because it is
> > sqrt(neg).
> > Because if people want it to work the other way they can always just make
> > it sqrt(abs(x)) instead of sqrt(x).
>
> I think this might be difficult to do, because the isosurface is solved
> by sampling the function at different points. I don't see how it could
> be done.
> Then again, it is after midnight now, it is probably just that I am
> tired and not thinking straight.
>
> --
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 14 Jan 2000 17:16:00
Message: <387F9F51.19F25191@my-dejanews.com>
Yet another possibility, as I jokingly suggested, is that pov has "discovered"
solutions to these functions, and mathematicians and programs like Lotus 123 are
"wussies" for refusing to give an answer to these unorthodox
questions..............

Greg M. Johnson wrote:

> But the point is that pov is doing SOMETHING.  If it finds a definite
> isosurface for a mathematically undefined region of space, then povray is in
> reality not computing the given function, but converting it to some defined
> function. Or there is an error in how it has defined some functions.
>
> perhaps
>     x^a = sign(x)^int(a) * abs(x)^a
>
> because
>     noise3d(x^3.1, y, z)
> gives "something" for negative values of x !
>
> I'm not complaining as much as striving to solve the mystery . . .


Post a reply to this message

From: Chris Huff
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 14 Jan 2000 17:21:35
Message: <chrishuff_99-19A28A.17215614012000@news.povray.org>
In article <387F9E1B.F3DF1811@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> But the point is that pov is doing SOMETHING.  If it finds a definite
> isosurface for a mathematically undefined region of space, then povray is 
> in reality not computing the given function, but converting it to some 
> defined
> function. Or there is an error in how it has defined some functions.

But if it stops when it attempts to sample at an undefined spot, there 
could be defined areas that would be missed or rendered incorrectly.

Maybe there should be a "strict_math" option. If strict_math is on, then 
it will perform the solving operation as it usually does, and then test 
the function at that point using standard math to see if it is defined 
at that point. If it is defined, then count it as an intersection, 
otherwise skip it. That way, the undefined areas would be removed(by a 
kind of customized clipping). And older isosurfaces would still work 
properly, either with the addition of "strict_math off" or by having 
strict_math default to off.

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Mike Williams
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 14 Jan 2000 21:20:24
Message: <FslWUEAg43f4EwTB@econym.demon.co.uk>
Wasn't it David Fontaine who wrote:
>What I think POV *should* do is not include these areas in the graph. Say I
>want to graph a hemisphere on my TI-89, I do x^2+y^2+z^2=1, z^2=-x^2-y^2+1,
>z=sqrt(1-x^2-y^2), and graph it and it gives me my hemisphere, and the area
>*outside* the hemisphere is ignored (not rendered) because it is sqrt(neg).
>Because if people want it to work the other way they can always just make
>it sqrt(abs(x)) instead of sqrt(x).

That might be possible when using the function as an isosurface, but
such a function can also be used as a pattern for a pigment or normal.
When a function has no solution in a region of space you could ignore it
if you're using that function to define a surface, but what could you do
if there's a point where the surface exists but the pigment and/or
normal doesn't. E.g.

sphere {0,1
        pigment {
            function {noise3d(x^0.5/K, y/K, z/K)}
            colour_map{[0 rgb <1,0,0>][1 rgb <1,1,0>]}
            }    
        normal {
            function {noise3d(x^0.5/K, y/K, z/K)}
            }
       }     

-- 
Mike Williams + #
Gentleman of Leisure


Post a reply to this message

From: David Fontaine
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 15 Jan 2000 22:45:49
Message: <38813C69.D04DBC9F@faricy.net>
> That might be possible when using the function as an isosurface, but
> such a function can also be used as a pattern for a pigment or normal.
> When a function has no solution in a region of space you could ignore it
> if you're using that function to define a surface, but what could you do
> if there's a point where the surface exists but the pigment and/or
> normal doesn't. E.g.
>
> sphere {0,1
>         pigment {
>             function {noise3d(x^0.5/K, y/K, z/K)}
>             colour_map{[0 rgb <1,0,0>][1 rgb <1,1,0>]}
>             }
>         normal {
>             function {noise3d(x^0.5/K, y/K, z/K)}
>             }
>        }

Well it's up to the user to make a function that doesn't do that. It could issue
a warning and replace it with zero or something.

--
Homepage: http://www.faricy.net/~davidf/
___     ______________________________
 | \     |_       <dav### [at] faricynet>
 |_/avid |ontaine      <ICQ 55354965>


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 17 Jan 2000 07:04:08
Message: <38830469.C475282D@my-dejanews.com>
No problem, but pov is doing SOMETHING.  It makes up its own definition in the
undefined areas. That's the mystery.

what is x^a?



Chris Huff wrote:

> In article <387F9E1B.F3DF1811@my-dejanews.com>,
>
> But if it stops when it attempts to sample at an undefined spot, there
> could be defined areas that would be missed or rendered incorrectly.
>
> Maybe there should be a "strict_math" option. If strict_math is on, then
> it will perform the solving operation as it usually does, and then test
> the function at that point using standard math to see if it is defined
> at that point. If it is defined, then count it as an intersection,
> otherwise skip it. That way, the undefined areas would be removed(by a
> kind of customized clipping). And older isosurfaces would still work
> properly, either with the addition of "strict_math off" or by having
> strict_math default to off.
>
> --
> Chris Huff
> e-mail: chr### [at] yahoocom
> Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Matt Giwer
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 17 Jan 2000 11:54:25
Message: <38834975.C6C381E5@ij.net>
"Greg M. Johnson" wrote:

> No problem, but pov is doing SOMETHING.  It makes up its own definition in the
> undefined areas. That's the mystery.
>
> what is x^a?

    x to the power a or exp( a * log(x) )

    If a = 2 then it would be x*x


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 17 Jan 2000 16:20:44
Message: <388386DC.48C2398@my-dejanews.com>
Matt Giwer wrote:

> "Greg M. Johnson" wrote:
> > what is x^a?
>     x to the power a or exp( a * log(x) )
>     If a = 2 then it would be x*x

Nope.  You cannot take the ln(x) of a negative x! Therefore, that's NOT what povray
is doing!  My guess is

x^a= sign(x)^int(a)* abs(x)^a .

My re-writing of the function is "defined" for all values of x and a, whereas x^a is
NOT.

Again, I hound this point not to attack the giants whose shoulder we stand on--pov
developers--but to have fun at solving a mathematical mystery : what IS pov doing?


Post a reply to this message

From: Ken
Subject: Re: Square roots of negative numbers in isosurfaces?
Date: 17 Jan 2000 16:25:00
Message: <3883870C.729B3B58@pacbell.net>
"Greg M. Johnson" wrote:

> Again, I hound this point not to attack the giants whose shoulder we stand on--pov
> developers--but to have fun at solving a mathematical mystery : what IS pov doing?

Perhaps only Mr. Suzuki can answer this question...

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 6 Messages >>>

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