Discussion forum about PANORAMIC language

Mac, Windows & Android application development with PANORAMIC language
 
HomeFAQSearchRegisterMemberlistUsergroupsLog in
Latest topics
» Hello world.
by Mon Jun 19, 2017 1:37 am

» 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

» Can I change the program icon/logo in my application ?
by Thu Jul 07, 2016 3:32 am

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Share | 
 

 Barnsley Fern

View previous topic View next topic Go down 
AuthorMessage
papydall

avatar

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

PostSubject: 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"
Back to top Go down
View user profile
jicehel



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

PostSubject: Re: Barnsley Fern   Sat 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
View user profile
papydall

avatar

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

PostSubject: 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.
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Barnsley Fern   

Back to top Go down
 
Barnsley Fern
View previous topic View next topic 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: