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 | 
 

  Triangle of Sierpinski

View previous topic View next topic Go down 
AuthorMessage
papydall

avatar

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

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

Code:

rem ============================================================================
rem              Triangle of Sierpinski
rem                  By Papydall
rem ============================================================================

dim p(3,2), px, py, point%
p(1,1)=320
p(1,2)=0

p(2,1)=640
p(2,2)=512

p(3,1)=0
p(3,2)=512

px=int(rnd(640))
py=int(rnd(512))

width 0,700 : height 0,600 : color 0,0,0,0
2d_pen_color 255,0,0 : 2d_fill_color 255,0,0
caption 0,"Triangle of Sierpinski ... <ESC> to stop ..."
repeat
  point%=max(min(3,int(rnd(3)+1)),1)
  px=int(((p(point%,1)-px)*0.5)+px)
  py=int(((p(point%,2)-py)*0.5)+py)
  2d_circle px+20,py+20,1 : display
until scancode = 27
terminate
rem ============================================================================
Back to top Go down
View user profile
 
Triangle of Sierpinski
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Interview: Gamestop Employee Tells Us That Wii Games Will Stop Being Sold On July 1st!

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: