Logo by reallybigname - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. April 25, 2024, 01:56:23 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Distance Estimation formula for the Burning Ship?  (Read 5992 times)
0 Members and 1 Guest are viewing this topic.
laser blaster
Iterator
*
Posts: 178


« on: January 23, 2014, 04:29:48 AM »

Hello, all. Does anyone know of a distance estimation formula for the 2D burning ship fractal? I'm assuming someone must know it because I've seen videos of a 3D ray-traced Burning Ship fractal. Also, I'd be interesting in an explanation for how the formula can be derived.
Logged
hermann
Iterator
*
Posts: 181



WWW
« Reply #1 on: January 23, 2014, 09:29:36 PM »

The Formula can be found on the following Wikipedia site:
http://en.wikipedia.org/wiki/Burning_Ship_fractal

In this forum you can find the following post's
http://www.fractalforums.com/general-discussion-b77/burning-ship-fractal/

You may also have a look on my personal burning ship page:
http://www.wackerart.de/burning-ship.html
I hope Java is active in your browser to explore some of my fractals online.

Hermann
Logged

laser blaster
Iterator
*
Posts: 178


« Reply #2 on: January 24, 2014, 10:18:51 PM »

That's just the iterative formula for determining if a point is in the burning ship. Distance estimation is another beast altogether.

By the way, using the standard Mandelbrot DE method for the burning ship produces okay-looking, smooth results, but in some areas the DE formula overestimates/underestimates the distance far more than others, so the results aren't consistent, and in one particular are it fails altogether.

Perhaps trying to come up with an accurate DE formula for a non-analytic fractal like the burning ship is a fools errand. I'm going to go out on a limb and guess that the guy who programmed the 3D distance-estimated burning ship used the standard mandelbulb DE method, designed the formula of the fractal to cut out any "problem areas", used a high fudge factor, and hoped for the best.
Logged
top-quark
Forums Freshman
**
Posts: 10


« Reply #3 on: April 20, 2014, 05:36:17 PM »

Here's what I'm using:

Formula: zk+1 = (|re(zk)| + |im(zk)| * i)2 - c

Algorithm:

Parameters: cX, cY

Let:
x_ = cX, y_ = cY,
eV = 256,
iter = 0,
rsquared = x_ * x_ + y_ * y_,
dzx = 0, dzy = 0;                   // For accumulating ∂f(c) / dc

while (iter < MAX_ITER AND rsquared < eV) {
    // Take absolute values of re and im
    _x = x_ < 0 ? -x_ : x_;
    _y = y_ < 0 ? -y_ : y_;

    // Calculate dz
    tmp = 2 * (dzx * _x - dzy * _y) - 1;
    dzy = 2 * (dzx * _y + dzy * _x);
    dzx = tmp;

    // Real part
    x_ = _x * _x - _y * _y - cX;
    // Imaginary part
    y_ = 2 * _x * _y - cY;
    
    rsquared = x_ * x_ + y_ * y_;
}

if (iter < MAX_ITER) {
   Let:
   r = sqrt(rsquared),
   dz = sqrt(dzx * dzx + dzy * dzy),
   distance = log(r * r) * r / dz;
   if (distance < PIXEL_WIDTH / 20) {
       return BLACK;
   }
   else {
       return COLOUR;
   }
}
return WHITE;


Can be adapted for Julia set: initialize (x_, y_) to pixel, dz to 1, don't subtract 1 from dz each iteration.

Looks pretty fierce white on black:

burningship-distance-estimate-white-on-black by c.c.williams, on Flickr

Distance estimation doesn't outline the keel terribly well but works absolutely fine everywhere else, armada towers in particular, which suggests that it's fundamentally good. Works for Julia sets too.
« Last Edit: April 21, 2014, 11:28:08 AM by top-quark » Logged
top-quark
Forums Freshman
**
Posts: 10


« Reply #4 on: April 20, 2014, 05:45:28 PM »

I suspect that why the distance estimation breaks down at certain points is because functions like y = |x| aren't differentiable everywhere.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Convergent Distance Estimation Programming David Makin 9 9840 Last post November 28, 2008, 10:27:01 PM
by gamma
Convergent Distance Estimation Mathematics David Makin 4 13176 Last post April 08, 2009, 10:07:14 PM
by David Makin
Need help with distance estimation formula for the Phoenix fractal Programming top-quark 6 1294 Last post April 26, 2014, 12:00:41 AM
by top-quark
Perturbation formula for burning ship (hopefully correct :P) (new) Theories & Research « 1 2 3 » laser blaster 34 4719 Last post September 20, 2017, 08:34:34 AM
by claude
3D Burning Ship formula and .frag file Fragmentarium laser blaster 7 4645 Last post March 01, 2015, 07:15:02 PM
by Crist-JRoger

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.153 seconds with 24 queries. (Pretty URLs adds 0.006s, 2q)