|
|
This isosurface should handle the 2D cases of the superformula as
described in http://astronomy.swin.edu.au/~pbourke/povray/supershape/
//---------------------------------
#declare m = 7;
#declare n1 = 5;
#declare n2 = 5;
#declare n3 = 5;
#declare a = 1;
#declare b = 1;
isosurface {
function { pow(
pow(abs(cos(0.25*m*acos(y/sqrt(x*x+y*y))*abs(y)/y)/a),n2) +
pow(abs(sin(0.25*m*acos(y/sqrt(x*x+y*y))*abs(y)/y)/b),n3)
,1/n1) * sqrt(x*x+y*y) - 1 }
contained_by { box { <-2,-2,-2>, <2,2,2> } }
scale <1,1,0.001>
pigment { Yellow }
}
box {<0.01,0.01,1>,<-0.01,-0.01,-1> rotate<0, 0,0> pigment {Red} }
box {<0.01,0.01,1>,<-0.01,-0.01,-1> rotate<0,90,0> pigment {Green}}
box {<0.01,0.01,1>,<-0.01,-0.01,-1> rotate<90,0,0> pigment {Blue} }
Regards, Hans
Dave Vogt wrote:
> Hi there,
>
> Last week, the heise newsticker had an article[1] about the
> superformula. It is told that using this formula, you can describe
> (almost) every thinkable shape with only a few parameters. Well, they
> had a link to a site[2] where you can download a tool to play around
> with, and even export a mesh to pov! I couldn't resist and now I think
> I would like to share this with you.. even if only the rendering is
> done in pov.
> There was also someone who implemented the formula in pov[3],
> dynamically generating a mesh. I didn't try that yet.
>
> Ah yes, I was so stupid to not store the parameters to the formula for
> this object, sorry ;)
>
>
> Greets,
>
> Dave V.
>
> [1] http://www.heise.de/newsticker/meldung/45863
> [2] http://www.genicap.com/
> [3] http://astronomy.swin.edu.au/~pbourke/povray/supershape/
>
>
>
> ------------------------------------------------------------------------
>
Post a reply to this message
|
|