import tkinter as tk from tkinter import Canvas, ttk from tkinter.constants import RIDGE from listclass import ObjectLists from vector3Dclass import Vector3D from pointclass import Point from lineclass import Line from planeclass import Plane from nameAssignclass import NameAssign from colorAssignclass import ColorAssign x = Vector3D(3, 4, 5) y = Plane.normalForm(Vector3D(1, 1, 1), Vector3D(2, 2, 2)) z = Plane.parameterForm(Vector3D(3, 4, 5), Vector3D(2, 2, 2), Vector3D(2, 2, 2)) class MainGUI(tk.Frame): width = 1200 height = 700 size = str(width) + "x" + str(height) def __init__(self): self.root = tk.Tk() self.root.title("Vektorplotter") self.root.geometry(self.size) #self.root.resizable(0, 0) self.makeMainframe() self.makeListFrame() self.makeMenuFrame()
print("Position Vector: ") Vec1 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) print("Direction Vector: ") Vec2 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) name = input("Name: ") LinList.append(Line(Vec1, Vec2, name, (0, 0, 0))) print(str(LinList[-1])) elif UserInput == "NewPla": print("Position Vector: ") Vec1 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) print("Direction Vector One: ") Vec2 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) print("Direction Vector Two: ") Vec3 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) name = input("Name: ") PlaList.append(Plane.parameterForm(Vec1, Vec2, Vec3, name, (0, 0, 0))) print(str(PlaList[-1])) elif UserInput == "ConvertPlaToHess": print("Position Vector: ") Vec1 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) print("Direction Vector One: ") Vec2 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) print("Direction Vector Two: ") Vec3 = Vector3D(input("x = "),input("y = "),input("z = "),input("Name = ")) name = input("Name: ") PlaList.append(Plane.parameterForm(Vec1, Vec2, Vec3, name, (0, 0, 0))) print(str(PlaList[-1].convertToHessianNormalForm())) elif UserInput == "X": running = False else: print("Uberprüfen Sie bitte ihre Eingabe!")