POV-Ray : Newsgroups : povray.binaries.images : Super Shapes with isosurface : Super Shapes with isosurface Server Time
19 May 2024 04:53:10 EDT (-0400)
  Super Shapes with isosurface  
From: Hans de Vries
Date: 22 Mar 2004 19:32:09
Message: <405f8589@news.povray.org>
I did some experiments to express the SuperFunction from
Dave Vogt's post with a single isosurface. It seems to work
fine.

Dave's original links:

[1] http://www.heise.de/newsticker/meldung/45863
[2] http://www.genicap.com/
[3] http://astronomy.swin.edu.au/~pbourke/povray/supershape/

The PovRay code as a Macro:

......................................

#macro Super_Function_3D (m1, a1, b1, n11, n21, n31, m2, a2, b2, n12, n22, n32 )

   isosurface {
     function {
                pow(  pow(abs(cos(0.25*m2*asin(z/sqrt(x*x+y*y+z*z)))/a2),n22)  +
                      pow(abs(sin(0.25*m2*asin(z/sqrt(x*x+y*y+z*z)))/b2),n32)
                    ,1/n12)  *

                pow(  pow(abs(cos(0.25*m1*acos(y/sqrt(x*x+y*y))*abs(y)/y)/a1),n21)  +
                      pow(abs(sin(0.25*m1*acos(y/sqrt(x*x+y*y))*abs(y)/y)/b1),n31)
                    ,1/n11)  *

                    sqrt (x*x+y*y+z*z)
                - 1
              }
     max_gradient 20
     contained_by { box { <-2,-2,-2>,<2,2,2> } }
    }

#end

.........................................

And a test image with the following parameters taken from an example on link [3]:

{ Super_Function_3D ( 7, 1, 1, 20.45, -0.33, -3.54, 6, 1, 1 ,-0.96, 4.46, 0.52 ) }

Regards, Hans


Post a reply to this message


Attachments:
Download 'superfunction_isosurface.jpg' (14 KB)

Preview of image 'superfunction_isosurface.jpg'
superfunction_isosurface.jpg


 

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