|
![](/i/fill.gif) |
in news:Xns### [at] povray org ingo wrote:
> Just an idea, more general than the above: find the set parametric
> equations for the "superquadratic ellipsoid" then plug in a forth
> function for the displacement and build a mesh using 'param.inc' or
> the 'parametric' object.
>
Couldn't resist, although I have to do other things, so here is the
basic stuff for the superellipsoid as a parametric without displacement.
Equation and information comes from:
http://diogenes.iwt.uni-bremen.de/vt/laser/papers/Wriedt-
superellipsoids-PartPartSystCharact-2002.pdf
param.inc can be found at: http://members.home.nl/seedseven/
---%<------%<---
#version 3.5;
#include "param.inc"
#include "math.inc"
global_settings {assumed_gamma 1.0}
camera {location <0,0,-3> look_at <0,0,0>}
light_source { <500,500,-500> rgb <1,0.9,0.8> }
light_source { <-100,100,-500> rgb <0.3,0.3,0.5> }
#declare A=1; //controles the size
#declare B=1;
#declare C=1;
#declare N=0.4; //controles the shape
#declare E=3.3;
#declare F1=function(u,v){A*sgn(cos(u))*pow(abs(cos(u)),N)*sgn(cos(v))
*pow(abs(cos(v)),E)}
#declare F2=function(u,v){B*sgn(cos(u))*pow(abs(cos(u)),N)*sgn(sin(v))
*pow(abs(sin(v)),E)}
#declare F3=function(u,v){C*sgn(sin(u))*pow(abs(sin(u)),N)}
object {
Parametric (
F1, F2, F3,
<-pi/2,-pi>, <pi/2,pi>,
50, 50,""
)
pigment {uv_mapping checker rgb 1 rgb <0,0,1> scale <0.2,0.1,1>}
finish{specular 0.3}
rotate <45,0,0>
}
---%<------%<---
Post a reply to this message
|
![](/i/fill.gif) |