POV-Ray : Newsgroups : povray.general : Isosurface help : Re: Isosurface help Server Time
30 Jul 2024 18:14:24 EDT (-0400)
  Re: Isosurface help  
From: Dan Connelly
Date: 23 Jan 2009 20:54:30
Message: <497a74d6$1@news.povray.org>
Warp wrote:
> clipka <nomail@nomail> wrote:
>> I would assume that as (x+y+z-1) gives different results than (x^2+y^2+z^2-1)
>> (the former is a plane, while the latter is a sphere), so would (x^4+y^4+z^4-1)
>> (some... quartic? Never tried it out)
> 
>   I think it produces something which looks like a rounded cube, ie. like
> a superellipsoid with both parameters the same (like <.1, .1> or whatever).
> 

That's correct.  What he should have written to still get a sphere is:

(x^2 + y^2 + z^2)^2 - 1 = 0

or

x^4 + 2 x^2 y^2 + 2 z^2 x^2 + y^4 + 2 y^2 z^2 + z^4 - 1 = 0

Note x^4 + y^4 + z^4 - 1 does not yield the sphere, but the rounded cube, as you note.
 The difference terms are

2[ x^2 y^2 + y^2 z^2 + z^2 x^2 ]

So the two are coincident where only one of the three coordinates is non-zero, ie
along the principal axes.  Everywhere else, omitting these terms requires a greater
value of x^4 + y^4 + z^4 to compensate... ie the object is drawn out to the corners.

He could also have written:

(x^2 + y^2 + z^2 - 1)^2 = 0

But since this never crosses zero, only tangentially touches it, I doubt the software
would be able to map the surface.

Dan


Post a reply to this message

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