Снова потянуло на изврат - увидел картинку BBC Bot, чем-то похожую на узор hitomezashi. Немного мучений, чтений документации ушибленного BBC Basic, и картинка готова:
If OpenWindow(0, 0, 0, 1280, 1024, "fibonacci", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 1280, 1024)
Dim e.a(68)
Restore fib
For L=0 To 33
Read.a d
E(L)=D
E(67-L)=69-D
Next L
If StartDrawing(CanvasOutput(0))
Box(0,0,1280,1024,0)
For s=0 To 67
d=e(s)
x=s*16
a=4+s&1
;4 Move To the absolute position.
;5 Draw a line, in the current graphics foreground colour, To the absolute coordinates specified by X And Y
For t=0 To 67
y=t*16
If t=d
a=a!1
EndIf
If a=5
LineXY(X+112,Y-48,X+112,Y+16-48,255)
EndIf
If a=5
LineXY(y+112,1088-x-48,y-16+112,1088-x-48,255)
EndIf
a=a!1
;https://www.bbcbasic.co.uk/bbcwin/manual/bbcwin3.html#basicmodes
Next t
Next s
;GCOL1,2
FillArea(528+112,96-48,0,$FFd4d4)
StopDrawing()
EndIf
Repeat
Event = WindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
DataSection
fib:
Data.a 34,33,31,30,27,37,40,26,41,44,24,23,47,48,20,50,51,17,16,54,14,13,57,58,10,61,64,9,7,65,66,6,67,68
CanvasGadget(0, 0, 0, 1280, 1024)
Dim e.a(68)
Restore fib
For L=0 To 33
Read.a d
E(L)=D
E(67-L)=69-D
Next L
If StartDrawing(CanvasOutput(0))
Box(0,0,1280,1024,0)
For s=0 To 67
d=e(s)
x=s*16
a=4+s&1
;4 Move To the absolute position.
;5 Draw a line, in the current graphics foreground colour, To the absolute coordinates specified by X And Y
For t=0 To 67
y=t*16
If t=d
a=a!1
EndIf
If a=5
LineXY(X+112,Y-48,X+112,Y+16-48,255)
EndIf
If a=5
LineXY(y+112,1088-x-48,y-16+112,1088-x-48,255)
EndIf
a=a!1
;https://www.bbcbasic.co.uk/bbcwin/manual/bbcwin3.html#basicmodes
Next t
Next s
;GCOL1,2
FillArea(528+112,96-48,0,$FFd4d4)
StopDrawing()
EndIf
Repeat
Event = WindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
DataSection
fib:
Data.a 34,33,31,30,27,37,40,26,41,44,24,23,47,48,20,50,51,17,16,54,14,13,57,58,10,61,64,9,7,65,66,6,67,68
Комментарии
Отправить комментарий