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

41
potter.py Executable file
View File

@@ -0,0 +1,41 @@
from Plotter import *
from Command import *
from Program import *
import Tkinter as tk
def show(p):
win=tk.Tk()
win.title('HPGLPLOTTER')
plt=Plotter((10,10,590,590))
canvas=tk.Canvas(win,width=600,height=600)
canvas.grid(row=0,column=0)
x = y = 0
p=p.flip()
p=plt.full(p)
p=plt.centralize(p)
for command in p.commands:
if command.name == 'PU':
x,y = command.x,command.y
elif command.name=='PD':
canvas.create_line(x,y,command.x,command.y)
x,y = command.x,command.y
elif command.name == 'CI':
r=command.args[0]
canvas.create_oval(x-r,y-r,x+r,y+r)
win.mainloop()
plt=Plotter()
p=Program()
p.parsefile('hpgl/Lars.plt')
p=p.flip()
p=plt.full(p)
p=plt.centralize(p)
plt.write(p)
#show(p)
p=p+10