initial commit

This commit is contained in:
Lukas Cremer
2026-02-03 21:09:26 +01:00
commit 9fe02d248f
333 changed files with 25642 additions and 0 deletions

20
refac/hilbert.py Executable file
View File

@@ -0,0 +1,20 @@
import math
from Program import Program
from Command import Command
from hilbertcurve.hilbertcurve import HilbertCurve
penthickness=28
def hilbert( laenge, dicke):
tiefe=math.floor(math.log(laenge/dicke,2)+3)
print("Tiefe",tiefe)
hilbert_curve = HilbertCurve(tiefe , 2)
pts = [hilbert_curve.coordinates_from_distance(i) for i in range(4*(2**tiefe))]
return pts
def hilbert_curve(plt):
list=hilbert(min(plt.winsize[0],plt.winsize[1]),penthickness)
return Program([Command('IN'),Command('SP1'),Command('PU',*list[0])]\
+[Command('PD',*p) for p in list[1:]]\
+[Command('PU')])