-
Notifications
You must be signed in to change notification settings - Fork 0
/
3D_Cartesian_coordinate.py
95 lines (67 loc) · 1.84 KB
/
3D_Cartesian_coordinate.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import matplotlib.pyplot as plt
import numpy as np
import tkinter as tk
import sys
import os
from mpl_toolkits.mplot3d import Axes3D
import tkinter
from matplotlib.backends.backend_tkagg import (
FigureCanvasTkAgg, NavigationToolbar2Tk)
import time
import threading
from matplotlib.backend_bases import key_press_handler
from matplotlib.figure import Figure
form = tk.Tk()
form.state("zoomed")
fig = Figure()
canvas = FigureCanvasTkAgg(fig, master=form)
canvas.get_tk_widget().place(x=600, y=10)
a = fig.add_subplot(projection='3d')
t = 1
a.plot(1, 1)
x = []
y = []
z = []
a.scatter(x, y, z, c="r", marker="o")
def noktabirgoster():
bas1 = int(giris1x.get())
bas2 = int(giris1y.get())
bas3 = int(giris1z.get())
x.append(bas1)
y.append(bas2)
z.append(bas3)
# ---------------------------------------
fig = Figure()
canvas = FigureCanvasTkAgg(fig, master=form)
canvas.get_tk_widget().place(x=600, y=10)
a = fig.add_subplot(projection='3d')
t = 1
a.plot(1, 1)
# a.plot3D(x, y, z)
a.scatter(x, y, z, c="r", marker="o")
# a.plot3D(q, w, e)
a.set_xlabel("x koordinatı")
a.set_ylabel("y koordinatı")
a.set_zlabel("z koordinatı")
a.plot3D(x, y, z)
label2 = tk.Label(text="X KOORDİNATI",
font="times 15"
)
label2.place(x=50, y=100)
giris1x = tk.Entry(form)
giris1x.place(x=60, y=150)
label3 = tk.Label(text="Y KOORDİNATI",
font="times 15"
)
label3.place(x=250, y=100)
giris1y = tk.Entry(form)
giris1y.place(x=260, y=150)
label4 = tk.Label(text="Z KOORDİNATI",
font="times 15"
)
label4.place(x=450, y=100)
giris1z = tk.Entry(form)
giris1z.place(x=460, y=150)
goster1 = tk.Button(text="ekle ve göster", command=noktabirgoster)
goster1.place(x=275, y=200)
form.mainloop()