Discussion forum about PANORAMIC language
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Discussion forum about PANORAMIC language

Mac, Windows & Android application development with PANORAMIC language
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  
Latest topics
» What happened with the panoramic language ?
by Wed Jan 03, 2024 4:09 pm

» Hello world.
by Wed May 09, 2018 11:53 pm

» Biomorphes de PICKOVER
by Sun Jun 18, 2017 2:33 am

» In less than 10 lines of code
by Fri Jun 16, 2017 5:03 am

» Effect Dopler
by Fri Jun 16, 2017 3:29 am

» SuperEllipse
by Wed Jun 14, 2017 4:01 am

» Plants
by Wed Jun 14, 2017 3:38 am

» Mira's attractor
by Wed Jun 14, 2017 3:30 am

» Triangle of Sierpinski
by Wed Jun 14, 2017 3:22 am

» Esthétique polaire
by Wed Jun 14, 2017 3:16 am

» Butterfly effect : Lorenz equations
by Wed Jun 14, 2017 3:08 am

» Collision detection
by Tue Jun 13, 2017 5:09 am

» The Bees Laline Paull Epub Books
by Mon Oct 10, 2016 8:58 pm

» PANORAMIC for Mac OSX 10 is available
by Tue Aug 09, 2016 6:08 pm

» ide
by Sat Jul 16, 2016 12:27 am

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

 

 Barnsley Fern

Go down 
2 posters
AuthorMessage
papydall

papydall


Number of posts : 39
Age : 73
Localisation : TUNISIA
Registration date : 2013-03-16

Barnsley Fern Empty
PostSubject: Barnsley Fern   Barnsley Fern EmptySat 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"
Back to top Go down
jicehel




Number of posts : 15
Registration date : 2013-03-12

Barnsley Fern Empty
PostSubject: Re: Barnsley Fern   Barnsley Fern EmptySat Mar 23, 2013 12:54 pm

Cool, i don't tink you had post it on the french forum.
Nice Smile
Back to top Go down
papydall

papydall


Number of posts : 39
Age : 73
Localisation : TUNISIA
Registration date : 2013-03-16

Barnsley Fern Empty
PostSubject: Re: Barnsley Fern   Barnsley Fern EmptySat Mar 23, 2013 2:03 pm

@Jicehel
I have already posted it on the French forum.
Anyway, thank you for your intervention.
Back to top Go down
Sponsored content





Barnsley Fern Empty
PostSubject: Re: Barnsley Fern   Barnsley Fern Empty

Back to top Go down
 
Barnsley Fern
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Discussion forum about PANORAMIC language :: Panoramic for Windows :: Source code (snippets)-
Jump to: