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

 

 In less than 10 lines of code

Go down 
AuthorMessage
papydall

papydall


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

In less than 10 lines of code Empty
PostSubject: In less than 10 lines of code   In less than 10 lines of code EmptyFri 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
papydall

papydall


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

In less than 10 lines of code Empty
PostSubject: Re: In less than 10 lines of code   In less than 10 lines of code EmptyFri 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
 
In less than 10 lines of code
Back to top 
Page 1 of 1
 Similar topics
-
» Editor code
»  code for a text editor
» Where is the code for the checkers game on the site
» Editor close/re-open

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: