|
![](/i/fill.gif) |
Am 22.11.2011 09:59, schrieb Jaime Vives Piqueres:
> The animation shows a 3D fractal created with Mandelbulber, which
> looks truly impressive... I've just downloaded it, and I can't stop
> playing with it. It's a shame that I cannot export these things to
> POV-Ray for a better texturing work... because I lack the skills to
> create them from the scratch, as you did.
>
> --
> Jaime
Yeah, Mandelbulber is fun!
Maybe you are able to come up with some more interesting texture work
than I did as I was mostly interested in the formula itself after having
played with Mandelbulber.
This is my try on doing it within POV-SDL. It needs some toying around
with the isosurface parameters (and the iteration limit) for closeup views.
-Ive
========================================================================+
#declare fm_recurse = function(Iteration, IterationBailout, x,y,z, MB_x,
MB_y, MB_z) {
select(Iteration > IterationBailout | pow(MB_x,2) + pow(MB_y,2) +
pow(MB_z,2) > 2, 0,
fm_recurse(Iteration+1, IterationBailout, x,y,z,
x + pow(pow(MB_x,2) + pow(MB_y,2) + pow(MB_z,2), 4)
* sin( atan2(sqrt(pow(MB_x,2) + pow(MB_y,2)), MB_z) * 8)
* cos( atan2(MB_y, MB_x) * 8),
y + pow(pow(MB_x,2) + pow(MB_y,2) + pow(MB_z,2), 4)
* sin( atan2( sqrt(pow(MB_x,2) + pow(MB_y,2)), MB_z) * 8)
* sin( atan2(MB_y,MB_x) * 8),
z + pow(pow(MB_x,2) + pow(MB_y,2) + pow(MB_z,2), 4)
* cos( atan2( sqrt(pow(MB_x,2) + pow(MB_y,2)), MB_z) * 8)
),
1 / (Iteration + log(L2 / log((Iteration > (Iteration-1)) +
pow(MB_x,2) + pow(MB_y,2) + pow(MB_z,2))) / L8)
)
};
#declare f_mandelbulb = function(x,y,z, MaxIterations) {
fm_recurse (1, int(MaxIterations-1), x,y,z, x,y,z)
}
#declare Mandelbulp = isosurface {
function {f_mandelbulb(x,y,z, 10)} // MaxIterations = 10
threshold 0.17
max_gradient 12
accuracy 0.001
contained_by {sphere {0, 1.2} }
/*
texture {
pigment {
function { f_mandelbulb(x,y,z, 5) } sine_wave
scale 1
frequency 4
color_map {
[0.00 rgb <0.7, 0.4, 0.1> ]
[1.00 rgb <0.9, 0.2, 0.0> ]
}
}
finish {
ambient 0 diffuse 0.9 specular 0 roughness 0.02
}
}
*/
texture {
pigment {
spherical
color_map {
[0.00 rgb <0.0, 0.6, 0.2> ]
[0.26 rgb <0.7, 0.4, 0.1> ]
[1.00 rgb <0.5, 0.1, 0.0> ]
}
turbulence 0.11
scale 1.2
}
finish {
ambient 0 diffuse 1
}
}
}
========================================================================+
Post a reply to this message
Attachments:
Download 'mandelbulp-8-8-2.jpg' (292 KB)
Preview of image 'mandelbulp-8-8-2.jpg'
![mandelbulp-8-8-2.jpg](/povray.binaries.images/attachment/%3C4ecb8b20%40news.povray.org%3E/mandelbulp-8-8-2.jpg?preview=1)
|
![](/i/fill.gif) |