POV-Ray : Newsgroups : povray.binaries.images : Super Shapes with isosurface : Re: Super Shapes with isosurface Server Time
19 May 2024 05:44:37 EDT (-0400)
  Re: Super Shapes with isosurface  
From: Tor Olav Kristensen
Date: 22 Mar 2004 20:46:50
Message: <405f970a@news.povray.org>
Hans de Vries wrote:
...
>     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
>              }
...

You can _try_ to increase the rendering speed, by replacing
'sqrt(x*x+y*y+z*z)' with 'f_r(x, y, z)' and 'sqrt(x*x+y*y)'
with 'f_r(x, y, 0)'.

Also you should have a look at the internal functions;
'f_th()' and 'f_ph()'.

http://www.povray.org/documentation/view/244/

Because it seems like these may enable you to simplify some
of your inverse trigonometric expressions.

E.g. this one: 'acos(y/sqrt(x*x+y*y))*abs(y)/y'

In order to use these functions, you must first include the
'functions.inc' file.

P.S.: antan2() is also useful.


-- 
Tor Olav
http://subcube.com
http://subcube.net


Post a reply to this message

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