POV-Ray : Newsgroups : povray.general : Povray Mandelbulbs - Isosurface and max_gradient : Povray Mandelbulbs - Isosurface and max_gradient Server Time
27 Jul 2024 12:18:55 EDT (-0400)
  Povray Mandelbulbs - Isosurface and max_gradient  
From: Droj
Date: 7 May 2024 16:45:00
Message: <web.663a8fd85eb6cc2d1397ab13b2af915@news.povray.org>
Hi folks,

I recently came across Paul Nylander's website at http://www.bugman123.com.
Marvellous images of 3D fractals rendered with Mathematica.
Exceptional rendering times and amazing images!
He also published some code to render Mandelbulbs in Povray.

Here is SDL for one of the Mandelbulbs:

// Mandelbulb - power 4 - Believe me the power 6 is a vision of hell!

// Adapted from original function for power 8 by Paul Nylander at
http://www.bugman123.com;
// Trace time on an AMD Ryzen7 Eight Core using 16 threads: 7 h 54 min with
max_gradient 1000
// Trace time on an AMD Ryzen7 Eight Core using 16 threads: 2 h 34 min with
max_gradient 200
-------------------------------------------------------
#version 3.7;
global_settings { assumed_gamma 2.2 }

// #include "colors.inc"
// #include "textures.inc"
// #include "math.inc"

camera{
 location <1.75,4,-5.5>
 look_at <0.0, 0.0, 0.0>
 up y
 sky y
 angle 25
}


light_source{<-20.00, 30.00, -20.00> color rgb < 1.0, 0.498039, 0.0 >} // color
Coral
light_source{<20.00, -30.00, 0.00> color rgb < 0.847059, 0.847059, 0.74902 >} //
color Wheat

#declare n=4;

#declare f=function(i,x,y,z,xc,yc,zc) {select(i>0 & x*x+y*y+z*z<4, 0,
sqrt(x*x+y*y+z*z),

f(i-1,pow(x*x+y*y+z*z,n/2)*cos(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+xc,
        pow(x*x+y*y+z*z,n/2)*sin(n*atan2(y,x))*cos(n*atan2(z,sqrt(x*x+y*y)))+yc,
        -pow(x*x+y*y+z*z,n/2)*sin(n*atan2(z,sqrt(x*x+y*y)))+zc,xc,yc,zc))};

isosurface{
 function{f(24,0,0,0,x,y,z)}
 threshold 2
 max_gradient 200 // found by Povray: 33566
 contained_by{sphere{0,1.5}}
 pigment{rgb 1}
}
//end
----------------------------------------------------------------
But a word of warning before you start:
DO NOT ACTIVATE any INC-FILE! When I did Povray crashes as soon as I start
rendering!

Has anyone an idea why Povray crashes?

There is only a warning in the Message Window that says something like
'iterations are not allowed in this function'.

Happy tracing - and when you do: grab a big snack and a big mug of coffee before
you do!

Droj


Post a reply to this message


Attachments:
Download 'mandelbulb_power4.png' (1117 KB)

Preview of image 'mandelbulb_power4.png'
mandelbulb_power4.png


 

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