Post Reply 
AriCalculator is a home made pocket calculator.
05-02-2019, 12:33 PM
Post: #69
RE: AriCalculator is a home made pocket calculator.
I found an old bit of Casio graphic calculator code I wrote for a 100x60 screen pixel grid. It seemed OK at 20 iterations per pixel position:

Code:

ClrGraph
For 1->P To 100  #for each screen position on a 100x60 grid
  For 1->Q To 60
   (P-50)/30->A #turn the screen pos. into a complex plane location
   (P-30)/30->B
   A->C     #buffer the complex number coefficients
   B->D
   0->N     # zero the iteration count
   1->S     # initially, assume the complex number is in the set
   Do
    1+N->N           #increment the iteration count
    A*A-B*B+C->G     #compute next real coefficient - hold in G
    2*A*B+D->B       #compute next imaginary coefficient
    G->A             #update A, ready for next iteration
    If A*A+B*B > 4   #test to see if we are still in the set
    Then
    0->S              #set S to 0 if break-out has occurred
    IfEnd
   LpWhile N < 20 And S=1 #repeat until N limit reached or breakout
   If S=1
   Then   #if in the set, then turn on current pixel (row, col)
   PxlOn Q, P
   IfEnd
  Next
Next
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: AriCalculator is a home made pocket calculator. - Chasfield - 05-02-2019 12:33 PM



User(s) browsing this thread: 1 Guest(s)