Home > Blockchain >  How can I redirect users to use math parametres in sinusoid?
How can I redirect users to use math parametres in sinusoid?

Time:12-03

Here is my problem, i don't know why. Please do not help me! Contrary to popular belief,

  1. umour, or randomised words which don't look even slightly believable. If you are going to use a pass
  2. nything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as nece
  3. nything embarrassing hidden in the

nything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as nece

enter image description here

enter image description here

47
48 def krzywa(self, czas):
49 # return np.cos(czas)
50 return np.sin(czas)
51 # return (czas / 2 - 3) ** 2
52 return 0
53
54 def wsp_kierunkowy(self, krok):
55 return (self.krzywa(krok   0.001) - self.krzywa(krok)) / 0.001
56
57 def modul(self, a, b):
58 return np.sqrt(a ** 2   b ** 2)
59
60 def srodek_okregu(self, krok):
61 a = self.wsp_kierunkowy(krok)
62 s_x = krok   self.r * (-a / self.modul(a, 1))
63 s_y = self.krzywa(krok)   self.r * (1 / self.modul(a, 1))
64 return s_x, s_y
65
66 def kat(self, krok):
67 return self.droga(krok) / self.r
68
69 def droga(self, krok): # dlugosc toru ruchu
70 droga_pokonana = 0
71 for i in np.arange(0, krok, 0.001):
72 droga_pokonana  = np.sqrt(0.001 ** 2   (self.krzywa(i) - self.krzywa(i   0.001)) ** 2)
73 return droga_pokonana
74
75
76 # if len(sys.argv) !=2:
77 # sys.exit('Podaj promien:\n')
78 # r = float(sys.argv[1])
79 # print(sys.argv[0])
80 # print(r)
81 r = 0.5
82
83 figura1 = figura_parametryczna(r)
84 plt.show()

ampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sectio

CodePudding user response:

You need to: s opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, so

2 import matplotlib.pyplot as plt
3 from matplotlib.animation import FuncAnimation
4
5 import matplotlib;
6
7 matplotlib.use("TkAgg")
8 import sys
9
10
11 class figura_parametryczna:
12 def __init__(self, r):
13 self.r = r
14 self.dokladnosc = 10
15 self.krok = 1000
16 self.x = []
17 self.y = []
18 self.epi_x = []
19 self.epi_y = []
20 self.dl_drogi = 0.
21
22 self.fig, self.ax = plt.subplots()
23 self.ax.set_xlim(0, 200)
24 self.ax.set_ylim(-10, 10)
25 self.animacja = FuncAnimation(self.fig, func=self.rysuj, frames=self.krok, interval=0.01)```

CodePudding user response:

I forgot to tell you should:

 def rysuj(self, krok):
28 self.czas = krok / self.dokladnosc
29 self.x.append(self.czas)
30 self.y.append(self.krzywa(self.czas))
31 s_x, s_y = self.srodek_okregu(self.czas)
32 self.epi_x.append(s_x   self.r * np.cos(-self.kat(self.czas)))
33 self.epi_y.append(s_y   self.r * np.sin(-self.kat(self.czas)))
34 self.wodzacy_x = [s_x, self.epi_x[-1]]
35 self.wodzacy_y = [s_y, self.epi_y[-1]]
36 self.ax.clear()
37 self.ax.plot(self.x, self.y, self.epi_x, self.epi_y, color="blue")
38 self.ax.plot(self.wodzacy_x, self.wodzacy_y, color='red')
39 kolo = plt.Circle((s_x, s_y), self.r, fill=False)
40 self.ax.add_patch(kolo)
41 # self.ax.set_xlim(0, 100)
42 # self.ax.set_ylim(-10, 10)
43 self.ax.set_aspect('equal')
44
45 # Obliczenie pozycji srodka okrego
46 self.srodek_okregu(krok)
  • Related