Author Topic: Fractal Fern  (Read 6358 times)

0 Members and 1 Guest are viewing this topic.

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Fractal Fern
« Reply #15 on: August 08, 2020, 02:36:51 am »
That's very impressive vince!

 
Screenshot_1_.png
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Fractal Fern
« Reply #16 on: August 08, 2020, 06:16:23 am »
Cool... Excellent job, Vince!
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Fractal Fern
« Reply #17 on: August 08, 2020, 12:05:00 pm »
+1 @_vince  nice coloring of classic Mandelbrot Explorer.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Fractal Fern
« Reply #18 on: August 08, 2020, 03:23:26 pm »
Awesome Vince! I like how you can zoom in.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Fractal Fern
« Reply #19 on: August 08, 2020, 03:52:03 pm »
Here is a larger version of the original fractal fern. This time I put it on a 800 x 600 screen and changed a couple numbers just by experimenting. The pixels end at 400000 and then it goes to an INKEY$ loop. I didn't want anymore pixels because I think it shows a better texture without it filled up.

Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(800, 600, 32)
  2. WINDOW (-5, 0)-(5, 10)
  3. COLOR _RGB32(127, 255, 127)
  4. FOR t = 1 TO 400000
  5.         CASE IS < .01
  6.             nextX = 0
  7.             nextY = .16 * y
  8.         CASE .01 TO .08
  9.             nextX = .1 * x - .5 * y
  10.             nextY = .23 * x + .22 * y + 1.6
  11.         CASE .08 TO .15
  12.             nextX = -.15 * x + .5 * y
  13.             nextY = .26 * x + .24 * y + .44
  14.         CASE ELSE
  15.             nextX = .85 * x + .04 * y
  16.             nextY = -.04 * x + .85 * y + 1.6
  17.     END SELECT
  18.     x = nextX
  19.     y = nextY
  20.     PSET (x, y)
  21. _LIMIT 100
  22. _TITLE "Press Esc to quit."
  23.  


Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Fractal Fern
« Reply #20 on: August 09, 2020, 10:32:43 pm »
I had some fun playing with your code in trying to understand the fractal plotting @SierraKen , nice work and good thread

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Fractal Fern
« Reply #21 on: August 11, 2020, 10:43:12 pm »
Thanks Vince, I just wish I could understand it. lol