Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,53 @@
load "guilib.ring"
new qapp
{
win1 = new qwidget() {
setwindowtitle("Mandelbrot set")
setgeometry(100,100,500,500)
label1 = new qlabel(win1) {
setgeometry(10,10,400,400)
settext("")
}
new qpushbutton(win1) {
setgeometry(200,400,100,30)
settext("draw")
setclickevent("draw()")
}
show()
}
exec()
}
func draw
p1 = new qpicture()
color = new qcolor() {
setrgb(0,0,255,255)
}
pen = new qpen() {
setcolor(color)
setwidth(1)
}
new qpainter() {
begin(p1)
setpen(pen)
x1=300 y1=250
i1=-1 i2=1 r1=-2 r2=1
s1=(r2-r1)/x1 s2=(i2-i1)/y1
for y=0 to y1
i3=i1+s2*y
for x=0 to x1
r3=r1+s1*x z1=r3 z2=i3
for n=0 to 30
a=z1*z1 b=z2*z2
if a+b>4 exit ok
z2=2*z1*z2+i3 z1=a-b+r3
next
if n != 31 drawpoint(x,y) ok
next
next
endpaint()
}
label1 { setpicture(p1) show() }