POV-Ray : Newsgroups : povray.binaries.images : Megpov: how to do a superelipse? Do we need x^p=sign(x)*|x|^p? : Re: Megpov: how to do a superelipse? Do we need x^p=sign(x)*|x|^p? Server Time
19 Aug 2024 06:20:50 EDT (-0400)
  Re: Megpov: how to do a superelipse? Do we need x^p=sign(x)*|x|^p?  
From: Greg M  Johnson
Date: 4 Jan 2001 17:06:21
Message: <3A54F274.BD9EC2D5@my-dejanews.com>
Chris Huff wrote:

> It is defined as "x raised to the power of n", and works fine with
> negative x and fractional values of n.
>
> > That would explain my missing quadrants on my superellipsoid. Will
> > try Tor's code, but have you any examples of working s-e's, too?
>
> Not for parametrics...I never messed with them very much. I think your
> problem is more of a problem with the parametric shape than the function
> evaluation. For isosurfaces, I usually use something like:
> function {Radius - sqrt(x^c1 + y^c2 + z^c3)}
>
> Which isn't the same as the superellipsoid primitive, but works.

Thanks, but just to make sure you understand that predicament.

When I set up parametric equations for a superellipsoid and set my e,n, as
<1,1> I got a perfect sphere. When I set them as <0.99, 1.0>, I got
something which was very close to a sphere where it existed but was missing
in 2 quadrants. So you see I wasn't trying to set up a sphere (hence your
suggestion for the sphere equation?) but was showing how the parametric
bombs out strangely in certain cases; my question is whether the parametric
cannot handle x^n with negative x and noninteger n.


Post a reply to this message

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