Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Hilbert-curve/FreeBASIC/hilbert-curve.basic
Normal file
18
Task/Hilbert-curve/FreeBASIC/hilbert-curve.basic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
Dim Shared As Integer ancho = 64
|
||||
|
||||
Sub Hilbert(x As Integer, y As Integer, lg As Integer, i1 As Integer, i2 As Integer)
|
||||
If lg = 1 Then
|
||||
Line - ((ancho-x) * 10, (ancho-y) * 10)
|
||||
Return
|
||||
End If
|
||||
lg = lg / 2
|
||||
Hilbert(x+i1*lg, y+i1*lg, lg, i1, 1-i2)
|
||||
Hilbert(x+i2*lg, y+(1-i2)*lg, lg, i1, i2)
|
||||
Hilbert(x+(1-i1)*lg, y+(1-i1)*lg, lg, i1, i2)
|
||||
Hilbert(x+(1-i2)*lg, y+i2*lg, lg, 1-i1, i2)
|
||||
End Sub
|
||||
|
||||
Screenres 655, 655
|
||||
|
||||
Hilbert(0, 0, ancho, 0, 0)
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue