papydall
Number of posts : 39 Age : 73 Localisation : TUNISIA Registration date : 2013-03-16
| Subject: Barnsley Fern Sat Mar 16, 2013 2:53 am | |
| Hi everyone. This short code draws the Barnsley Fern. - Code:
-
' **************************************************** ' * ' * Barnsley Fern ' * By Papydall ' * ' **************************************************** dim x,y,n,r,x1,y1 width 0,1000 : height 0,800 caption 0, "!!! BARNSLEY FERN BY PAPYDALL !!! PLEASE WAIT ... <CLICK> TO STOP" color 0,0,0,0 : 2d_pen_color 0,255,0 : cls for n = 1 to 50000 r = rnd (1) if r <= 0.01 : x = 0 : y = 0.16 * y else if r <= 0.08 : x = 0.2 * x - 0.26 * y : y = 0.23 * x + 0.22 * y + 1.6 else if r <= 0.15 : x = -0.15 * x + 0.28 * y : y = 0.26 * x + 0.24 * y + 0.44 else x = 0.85 * x + 0.04 * y : y = -0.04 * x + 0.85 * y + 1.6 end_if end_if end_if x1 = (x + 3) * 70 : y1 = 700 - y * 70 2d_point x1-50, y1 : 2d_point 700-x1,700-y1 : 2d_point 1000-x1,y1 if scancode <> 0 then end next n caption 0,"Completed" | |
|
jicehel
Number of posts : 15 Registration date : 2013-03-12
| Subject: Re: Barnsley Fern Sat Mar 23, 2013 12:54 pm | |
| Cool, i don't tink you had post it on the french forum. Nice | |
|
papydall
Number of posts : 39 Age : 73 Localisation : TUNISIA Registration date : 2013-03-16
| Subject: Re: Barnsley Fern Sat Mar 23, 2013 2:03 pm | |
| @Jicehel I have already posted it on the French forum. Anyway, thank you for your intervention. | |
|
Sponsored content
| Subject: Re: Barnsley Fern | |
| |
|