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

 

 Esthétique polaire

Go down 
AuthorMessage
papydall

papydall


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

Esthétique polaire Empty
PostSubject: Esthétique polaire   Esthétique polaire EmptyWed Jun 14, 2017 3:16 am

Code:

rem ============================================================================
rem               Esthétique polaire
rem                  Par Papydall
rem ============================================================================
dim xc1,yc1,xc2,yc2,xc3,yc3,xc4,yc4,xc5,yc5,r,rsur2,a,x,y,c$
dim c(360), s(360) : ' Tableaux des sinus / cosinus pour accélérer les calculs
degrees : ' on travaille en degrés
for a = 0 to 360 : c(a) = cos(a) : s(a) = sin(a) : next a
full_space 0

xc1 = width(0)/10 : yc1 = height(0)/2-20
xc2 = 3*xc1 : yc2 = yc1
xc3 = 5*xc1 : yc3 = yc1
xc4 = 7*xc1 : yc4 = yc1
xc5 = 9*xc1 : yc5 = yc1

color 0,100,50,100 : 2d_pen_color 255,255,255
alpha 10 : top 10,50 : left 10,50 : font_bold 10 : font_name 10,"tahoma"
font_color 10,255,255,0 : font_size 10,14
caption 0,"L'ESTHETIQUE POLAIRE ... PAR PAPYDALL ... <ESC> POUR ARRETER ..."
c$ = "Veuillez patienter ... Vous ne serez pas déçu(e)s, je l'espère ... <ESC> Pour arrêter !  "

for r = 1 to xc1 : ' step 2  ou 10 pour les impatients
    rsur2 = r / 2
    caption 10,c$ + str$(r) + " / " + str$(xc1)
    for a = 0 to 360
        x = rsur2 * (1-c(a)) * c(a) : y = rsur2 * (1-c(a)) * s(a)
        2d_pen_color mod(abs(a+x),255),mod(abs(a-r),255), mod(abs(r-y),255)
        2d_point xc1+x,yc1+y : 2d_point xc1-x,yc1+y
 ' -----------------------------------------------------------------------------
        x = rsur2 * (1+c(a)) * c(a) : y = rsur2 * (1-c(a)) * s(a)
        2d_point xc2+x,yc2+y : 2d_point xc2-x,yc2+y
 ' -----------------------------------------------------------------------------
        x = rsur2 * (1+c(a)) * c(a) : y = rsur2 * (1-s(a)) * s(a)
        2d_point xc3+x,yc3+y : 2d_point xc3-x,yc3+y
 ' -----------------------------------------------------------------------------
        x = rsur2* (1-c(a)) * c(a) : y = rsur2 * (1-c(a)) * s(mod(r,360))
        2d_point xc4+x,yc4+y : 2d_point xc4-x,yc4+y
        2d_point xc4+x,yc4-y : 2d_point xc4-x,yc4-y
 ' -----------------------------------------------------------------------------
        x = rsur2* (1-c(a)) * s(a) : y = rsur2 * (1-s(a)) * s(a)
        2d_point xc5+x,yc5+y : 2d_point xc5-x,yc5+y
 ' -----------------------------------------------------------------------------
        display
        if scancode = 27 then terminate
    next a
next r
' ------------------------------------------------------------------------------
repeat
   font_color 10, 255,0,0
   caption 10,"ADMIREZ ..... C'EST MAGNIFIQUE !!! .... C'EST    B O O O O O O !!!"
   pause 1000 :  font_color 10,0,255,0
   caption 10,"ADMIREZ ..... C'EST MAGNIFIQUE !!! .... C'EST    B O O O O O O !!!"
   pause 1000
until scancode = 27
terminate
rem ============================================================================
Back to top Go down
 
Esthétique polaire
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: