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 | 
 

 Mira's attractor

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: Mira's attractor   Wed Jun 14, 2017 3:30 am

Code:

rem ============================================================================
rem          Mira’s model
rem ============================================================================
dim a,b,n,x,y,z,w,xc,yc,zoom,maxiter
x = 15 : y = 0
 a = 0.7 : b = 0.9998 : zoom = 15
' a = 0.8 : b = 0.999 : zoom = 20
' a = 0.85 : b = 0.99978 : zoom = 20
' a = 0.80147 : b = 0.9987 : zoom = 20
' a = -0.48 : b = 0.93 : zoom = 12

w = a*x+(1-a)*2*x*x/(1+x*x)
picture 10 : full_space 10 : 2d_target_is 10 : color 10,0,0,0
xc = width(10)/2-30 : yc = height(10)/2 : maxiter = 10000
for n = 1 to maxiter
    caption 0,"Mira's attractor : Iteration : " + str$(n) + " / " + str$(maxiter) + " ... <ESC> to stop ..."
    z = x : x = b*y+w : w = a*x+(1-a)*2*x*x/(1+x*x) : y = w-z
  '  2d_pen_color mod(n,255),255-mod(n,255), abs(mod(n,255)-255)
    2d_pen_color 255,255,0
    2d_point xc+x*zoom,yc-y*zoom : display
    if scancode = 27 then terminate
next n
caption 0,"Finished !"
rem ============================================================================
Back to top Go down
View user profile
 
Mira's attractor
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: