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 | 
 

 In less than 10 lines of code

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: In less than 10 lines of code   Fri Jun 16, 2017 3:43 am

Code:

dim a,r,xc,yc ,xp,yp
full_space 0 : xc = screen_x/2 : yc = screen_y/2 -50 : color 0,0,0,0 : caption 0,"<CLICK> to stop ....."
repeat
   a = a + .0123456789 : r = r + .0123456789  : xp = xc + 2*r*COS(a) : yp = yc + r*SIN(a): if r > 200 then r = 0
   2d_pen_color 255,rnd(255),150 : 2d_rectangle xp-40,yp-40,xp+40,yp+40 : xp = xc + r*COS(a + .079 * 9) : yp = yc + r* SIN(a + .079 * 9)
   2d_pen_color rnd(255),0,155 : 2d_circle xp, yp,50 : 2d_pen_color 255,rnd(255),255 : 2d_circle xp+yp,xp-yp,40
   2d_pen_color rnd(150),150,rnd(150) : 2d_circle yp,xp-yp/1.25,60 : 2d_pen_color rnd(255),rnd(255),rnd(255) : 2d_rectangle xp-yp,yp,yp,xp-yp/1.5
   2d_pen_color 255,rnd(255),rnd(255) : 2d_circle yp,xp-yp,60 : 2d_pen_color rnd(255),rnd(255),rnd(255) : 2d_circle xp+xp/3+yp/4,xp-yp,50
until scancode <> 0
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: In less than 10 lines of code   Fri Jun 16, 2017 5:03 am

Code:

dim x,y,xc,yc,d,i
full_space 0 : caption 0,"!!! Please wait !!!  <ESC> to stop"
D = 1.20123456789 + rnd(1): xc = width(0)*0.5:yc = height(0)*0.5 : color 0,0,0,0
repeat
     i = i + 1.25 : X = X + sin(D * power(I,D)): Y = Y + COS(D *power(I,D))
     2d_pen_color mod(i,255),rnd(255),mod(i,255)
     2d_point xc+x,yc+y:2d_point xc-x,yc-y:2d_point xc+x,yc-y:2d_point xc-x,yc+y
until i > 240000 or scancode = 27
if i <= 240000 then caption 0,"!!! Stopped by user !!!" : else : caption 0, "!!! finished !!!"

Back to top Go down
View user profile
 
In less than 10 lines of code
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Silenium IDE code for selecting and ajax autopopulate dropdown item
» Export IDE code to JUNIT4, edit and import back to IDE
» Code Geass - Klok's Anime Reviews
» Webdriver code for dropdown selection is not working
» Pick-up lines

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: