Add PicoCalc SD folder for factory SD card files

This commit is contained in:
cuu 2025-03-15 13:06:24 +08:00
parent 4bcb28da87
commit 166eadc6d8
13 changed files with 104 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,24 @@
'Bifurcation diagram of the logistic map
Const W = 320
Const H = 320
Const R_MIN = 2.5
Const R_MAX = 4.0
Const ITER = 200
Const LAST_ITER = 50
Dim x As FLOAT
Dim r As FLOAT
Color RGB(128, 128, 128)
For i = 0 To W
r = R_MIN + (R_MAX - R_MIN) * i / W
x = 0.5
For j = 1 To ITER
x = r * x * (1 - x)
If j > (ITER - LAST_ITER) Then
Pixel H - Int(x * H), i
End If
Next j
Next i

View File

@ -0,0 +1,32 @@
'Lorenz attractor
Const S=10,R=28,B=8/3
Const DT=0.01,W=320,H=320
Const XMIN=-30,XMAX=30
Const YMIN=-30,YMAX=30
Const ZMIN=0,ZMAX=60
Dim x As FLOAT=1,y As FLOAT=1
Dim z As FLOAT=1,px,py,nx,ny,i
Function M(c,mi,ma,sm)
M=Int((c-mi)/(ma-mi)*sm)
End Function
CLS :Color RGB(255,127,0)
For i=1 To 10000
nx=M(x,XMIN,XMAX,W)
ny=M(y,YMIN,YMAX,H)
nz=M(z,ZMAN,ZMAX,H)
If i>1 Then Line px,H-py,nx,H-ny
'If i>1 Then Line px,H-pz,nx,H-nz
px=nx:py=ny:pz=nz
x=x+DT*S*(y-x)
y=y+DT*(x*(R-z)-y)
z=z+DT*(x*y-B*z)
Next
End

View File

@ -0,0 +1,48 @@
'Mandelbrot set
Option EXPLICIT
Const W = 320
Const H = 320
Const X_MIN = -2.0
Const X_MAX = 1.0
Const Y_MIN = -1.5
Const Y_MAX = 1.5
Const MAX_ITER = 16
Dim zx As FLOAT, zy As FLOAT
Dim cx As FLOAT, cy As FLOAT
Dim zx_next As FLOAT
Dim iter As INTEGER
Dim t As INTEGER
Dim x As INTEGER, y As INTEGER
Dim g As INTEGER
For y = 0 To H - 1
cy = Y_MIN + (Y_MAX - Y_MIN) * y / H
For x = 0 To W - 1
cx = X_MIN + (X_MAX - X_MIN) * x / W
zx = 0
zy = 0
iter = 0
t = zx * zx + zy * zy
Do While t <= 4 And iter < MAX_ITER
zx_next = zx * zx - zy * zy + cx
zy = 2 * zx * zy + cy
zx = zx_next
iter = iter + 1
If zx*zx>4 Or zy*zy>4 Then Exit Do
Loop
g = Int(255 * iter / MAX_ITER)
Color RGB(g, g, g)
Pixel x, y
Next x
Next y
Save Image "out.bmp", 0, 0, 319, 319
End

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB