• October 16, 2021, 05:41:57 PM

Author Topic:  Buffalo Ship  (Read 575 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr Rebooted

  • Fractal Fruit Salad
  • *****
  • Posts: 79
Buffalo Ship
« on: February 08, 2021, 04:49:55 PM »
Meh, I couldn't really think of a nicer name, but here you lads go

Formula:
Code: [Select]
if (re(z) < -fractalDist)
    z = abs((z-fractalDist*2))^2+c;
else
    z = abs(z)^2+c;

Where "fractalDist" is any number > 0.

Linkback: https://fractalforums.org/index.php?topic=4023.0

Offline FractalAlex

  • Perturbation formula helper
  • Fractal Freak
  • **
  • Posts: 687
  • One step closer to victory
Re: Buffalo Ship
« Reply #1 on: February 08, 2021, 09:01:10 PM »
Wait a second... I didn't knew we could do that! Using the technique soon enough, on my to do list.

Offline FractalAlex

  • Perturbation formula helper
  • Fractal Freak
  • **
  • Posts: 687
  • One step closer to victory
Re: Buffalo Ship
« Reply #2 on: February 08, 2021, 11:21:06 PM »
Tried to reproduce it in Ultra Fractal... but it gives different results.

Can you check my code?

Code: [Select]
Buffaloship {
init:
  z = c = #pixel
loop:
  if (real(z) < -@a)
     z = abs(z-@a*2)^@power + c
  else
     z = abs(z^@power) + c
  endif
bailout:
  |z| <= @bailout

default:
  title = "Buffalo Ship"
  center = (0, 0)
  helpfile = "Uf*.chm"
  helptopic = "Html\formulas\standard\mandelbrot.html"
$IFDEF VER50
  rating = recommended
$ENDIF
  param a
    default = (0.5, 0)
  endparam
  param power
    caption = "Power"
    default = (2,0)
  endparam
  float param bailout
    caption = "Bailout value"
    default = 4.0
    min = 1.0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam
}

Offline Mr Rebooted

  • Fractal Fruit Salad
  • *****
  • Posts: 79
Re: Buffalo Ship
« Reply #3 on: February 09, 2021, 02:54:18 PM »
Tried to reproduce it in Ultra Fractal... but it gives different results.

Can you check my code?

Code: [Select]
Buffaloship {
init:
  z = c = #pixel
loop:
  if (real(z) < -@a)
     z = abs(z-@a*2)^@power + c
  else
     z = abs(z^@power) + c
  endif
bailout:
  |z| <= @bailout

default:
  title = "Buffalo Ship"
  center = (0, 0)
  helpfile = "Uf*.chm"
  helptopic = "Html\formulas\standard\mandelbrot.html"
$IFDEF VER50
  rating = recommended
$ENDIF
  param a
    default = (0.5, 0)
  endparam
  param power
    caption = "Power"
    default = (2,0)
  endparam
  float param bailout
    caption = "Bailout value"
    default = 4.0
    min = 1.0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam
}

Show me a screenshot of your result.

Offline FractalAlex

  • Perturbation formula helper
  • Fractal Freak
  • **
  • Posts: 687
  • One step closer to victory
Re: Buffalo Ship
« Reply #4 on: February 09, 2021, 08:53:07 PM »
Here ya go. Here, a is set to 0.1. Can you fix it?

Offline Mr Rebooted

  • Fractal Fruit Salad
  • *****
  • Posts: 79
Re: Buffalo Ship
« Reply #5 on: February 09, 2021, 10:28:58 PM »
Here ya go. Here, a is set to 0.1. Can you fix it?

Check your else statement.
The formula is
Code: [Select]
z = abs(z^@power)+c

It should be
Code: [Select]
z = abs(z)^@power+c

Offline FractalAlex

  • Perturbation formula helper
  • Fractal Freak
  • **
  • Posts: 687
  • One step closer to victory
Re: Buffalo Ship
« Reply #6 on: February 09, 2021, 10:49:17 PM »
Did that. Still not the same as yours though.

Offline claude

  • 3f
  • ******
  • Posts: 2031
    • mathr.co.uk
Re: Buffalo Ship
« Reply #7 on: February 09, 2021, 11:41:25 PM »
Here's a FragM version:

Code: [Select]
vec2 formula(vec2 z, vec2 c)
{
  if (z.x < -Distance)
  {
    z.x += 2.0 * Distance;
  }
  return cSqr(abs(z)) + c;
}

(the sign of the addition is different, but I couldn't get matching results otherwise)

It essentially adds another vertical axis of folding at -Distance

Offline FractalAlex

  • Perturbation formula helper
  • Fractal Freak
  • **
  • Posts: 687
  • One step closer to victory
Re: Buffalo Ship
« Reply #8 on: February 27, 2021, 08:11:04 PM »
Great news, Mr Rebooted! I actually managed to reproduce it by translating Claude's .frag data into my Ultra Fractal formula file!
Code: [Select]
Buffaloship {
init:
  z = c = #pixel
  i = sqrt(-1)
loop:
  x = real(z)
  y = imag(z)
  dist = @a
  if (x < -dist)
     x = x + 2 * dist
  endif
  z = (abs(x) - abs(y)*i)^@power + c
bailout:
  |z| <= @bailout

default:
  title = "Buffalo Ship"
  center = (0, 0)
  helpfile = "Uf*.chm"
  helptopic = "Html\formulas\standard\mandelbrot.html"
$IFDEF VER50
  rating = recommended
$ENDIF
  param a
    default = (0, 0)
  endparam
  param power
    caption = "Power"
    default = (2,0)
  endparam
  float param bailout
    caption = "Bailout value"
    default = 128.0
    min = 1.0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam
}

Offline Mr Rebooted

  • Fractal Fruit Salad
  • *****
  • Posts: 79
Re: Buffalo Ship
« Reply #9 on: February 28, 2021, 12:59:55 AM »
Great news, Mr Rebooted! I actually managed to reproduce it by translating Claude's .frag data into my Ultra Fractal formula file!
Code: [Select]
Buffaloship {
init:
  z = c = #pixel
  i = sqrt(-1)
loop:
  x = real(z)
  y = imag(z)
  dist = @a
  if (x < -dist)
     x = x + 2 * dist
  endif
  z = (abs(x) - abs(y)*i)^@power + c
bailout:
  |z| <= @bailout

default:
  title = "Buffalo Ship"
  center = (0, 0)
  helpfile = "Uf*.chm"
  helptopic = "Html\formulas\standard\mandelbrot.html"
$IFDEF VER50
  rating = recommended
$ENDIF
  param a
    default = (0, 0)
  endparam
  param power
    caption = "Power"
    default = (2,0)
  endparam
  float param bailout
    caption = "Bailout value"
    default = 128.0
    min = 1.0
$IFDEF VER40
    exponential = true
$ENDIF
    hint = "This parameter defines how soon an orbit bails out while \
            iterating. Larger values give smoother outlines; values around 4 \
            give more interesting shapes around the set. Values less than 4 \
            will distort the fractal."
  endparam
}

Nice!


clip
Buffalo ?

Started by FractalDave on Programming

12 Replies
852 Views
Last post November 30, 2018, 02:40:01 AM
by mclarekin
clip
Burning Buffalo

Started by Sabine62 on Fractal Image Gallery

2 Replies
340 Views
Last post November 30, 2018, 11:30:29 PM
by Sabine62
xx
HPDZ Buffalo

Started by LionHeart on Programming

8 Replies
640 Views
Last post May 25, 2019, 02:57:09 PM
by LionHeart
xx
Buffalo Bulb

Started by 3DickUlus on Fractal Image Gallery

0 Replies
1323 Views
Last post November 17, 2018, 09:58:32 AM
by 3DickUlus
xx
Buffalo Julia Bulb

Started by 3DickUlus on Fractal Image Gallery

1 Replies
248 Views
Last post November 18, 2018, 11:21:45 AM
by timemit