Author Topic: Another banana Mandelbrot  (Read 402 times)

B+

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Another banana Mandelbrot
« on: September 21, 2016 »
Sorry, I had a few extra bananas hanging around after shooting down some gorillas:

Code: [Select]
'another banana mandelbrot.txt for Naalaa [B+=MGA] 2016-09-021
t = time()
XMAX = 700
YMAX = 600
set window 200, 40, XMAX, YMAX
set redraw off
load image 1, "assets/banana.png"
set color 255, 255, 255
draw rect 0, 0, XMAX, YMAX, true
for y = -30 to 30
  for x = -5 to 64
    m# = 0.0 ; r# = 0.0
    for k = 0 to 15
      j# = r# * r# - m# * m# - 2.0 + float(x) / 25.0
      m# = 2.0 * r# * m# + float(y) / 25.0
      r# = j#
      l = k % 16
      if j# * j# + m# * m# > 11.0 then k = 112
    next
    if l = 15
clear transformation
translate (float(x) + 5.0) * 10.0, (float(y) + 30.0) * 10.0
scale 1.0, 1.0
bananaRot# = float(rnd(360))
rotate bananaRot#
draw image 1
'set colori 0
'draw rect (x+5)*10, (y+30)*10, 10,  10, true
endif
  next
next
set caret 10, 10
set colori 0
wln "time ", (time() - t), " ms"
redraw
wait keydown
B+

Rick3137

  • Sr. Member
  • ****
  • Posts: 341
  • May the Force be with You
    • View Profile
    • Rick's Programs
Re: Another banana Mandelbrot
« Reply #1 on: September 21, 2016 »
 Cool art work, Mark.

 Now I need some extra Gorillas to clean the fruit off my computer screen.

B+

  • Full Member
  • ***
  • Posts: 215
    • View Profile
Re: Another banana Mandelbrot
« Reply #2 on: October 02, 2016 »
Hey! I hear that fruit flies!  :D
B+