POV-Ray : Newsgroups : povray.binaries.images : 'Accidental' isosurface : Re: 'Accidental' isosurface Server Time
23 Apr 2024 05:14:11 EDT (-0400)
  Re: 'Accidental' isosurface  
From: PM 2Ring
Date: 21 Nov 2009 11:10:01
Message: <web.4b080fc0ce81d185f4c648ed0@news.povray.org>
"scott" <sco### [at] scottcom> wrote:

> Hehe I just did the same :-)  Mine was 1024x1024x1024 df3 file which took
> about half an hour multithreaded under c#.net (I decided the speedup I could
> get by easy multithreading in c# outweighed the speedup I could get with C++
> over C#).  The render only took about 2 minutes, it's just an isosurface and
> a few lights.

Nice work, Scott. And others!

I have a slow old machine, with only 768MB of RAM, so my renders take a bit


I'm especially jealous of that special version of povray that can do custom
fractal functions. :) But I suppose it's probably slower than using a density
file. (I haven't played with them much before, and I'm frankly amazed at how
fast those things parse, even fairly huge ones.)

I *think* I figured a way to do this Mandelbulb function using standard SDL. We
don't need the ability to do arbitrarily deep iterations, since 6 or
7 are quite adequate. So we could unroll the iteration loop... into a veritable
rats' nest of functions, which would probably involve lots of duplicated
evaluations & be incredibly slow. :)

> > I haven't optimized the code too far yet, it's still using the trig
> > functions, but it can be used for any value N.
>
> Yeh mine too, it looks like there should be a way to lose the trig even with
> N=8, but it might get a bit scary...

You can lose the trig functions by using the formulae of sin(2t) & cos(2t) in
terms of sin(t) & cos(t). We want the 8th power, so we just double the angle 3
times. My first explorations of the Mandelbulb used Python to generate the voxel
data, but I translated my code to C today, and it should compile with no
problems on any system (if it supports doubles :)).

To avoid clutter, I'll post my C source in a separate message in this thread.

> The issue is that the isosurface is still made up of millions of little cube
> shaped voxels, I think the only way to improve that is to write a
> fractal-ray tracer too!  Or maybe patch POV...

Your renders look a fair bit smoother than mine. What accuracy are you using on
the isosurface, and what sort of max_gradient for that size grid? The one below
uses max_gradient 1072, accuracy 0.002.

The pigment on the attached image is just function{sqrt(x*x+z*z)*4.5}, with an
old favourite colour map I created many years ago when I was writing 2D
Mandelbrot programs on the Amiga.


Post a reply to this message


Attachments:
Download 'mandelbulbg8sa90.jpg' (160 KB)

Preview of image 'mandelbulbg8sa90.jpg'
mandelbulbg8sa90.jpg


 

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