update: start to bring up to 2026
This commit is contained in:
parent
2a46543702
commit
2f1a83a1a8
3 changed files with 293 additions and 44 deletions
|
|
@ -25,7 +25,7 @@ class spirographs:
|
|||
self.smallRadius = 5
|
||||
self.distance = 4
|
||||
self.rotations = 2
|
||||
self.highestTheta = (np.lcm(self.smallRadius, self.bigRadius)/self.bigRadius) * self.rotations * math.pi
|
||||
self.highestTheta = (np.lcm(self.smallRadius, self.bigRadius)/self.bigRadius) * 2 * math.pi
|
||||
self.stepSize = self.highestTheta / 4096
|
||||
# update initial slider positions
|
||||
self.bigRadiusAdjustment = builder.get_object('bigRadiusAdjustment')
|
||||
|
|
@ -136,8 +136,10 @@ class spirographs:
|
|||
self.plotFigure = Figure(figsize=(5, 8), dpi=100)
|
||||
self.epiPlot, self.hypoPlot = self.plotFigure.subplots(1, 2)
|
||||
self.epiPlot.set_title(f"Epitrochoid of {self.bigRadius}, {self.smallRadius}, {self.distance}")
|
||||
self.epiPlot.axis('equal')
|
||||
self.epiPlot.plot(self.epiX, self.epiY)
|
||||
self.hypoPlot.set_title(f"Hypotrochoid of {self.bigRadius}, {self.smallRadius}, {self.distance}")
|
||||
self.hypoPlot.axis('equal')
|
||||
self.hypoPlot.plot(self.hypoX, self.hypoY)
|
||||
|
||||
self.canvas = FigureCanvas(self.plotFigure)
|
||||
|
|
@ -149,7 +151,9 @@ class spirographs:
|
|||
self.hypoPlot.clear()
|
||||
self.epiPlot.set_title(f"Epitrochoid of {self.bigRadius}, {self.smallRadius}, {self.distance}")
|
||||
self.hypoPlot.set_title(f"Hypotrochoid of {self.bigRadius}, {self.smallRadius}, {self.distance}")
|
||||
self.epiPlot.axis('equal')
|
||||
self.epiPlot.plot(self.epiX, self.epiY)
|
||||
self.hypoPlot.axis('equal')
|
||||
self.hypoPlot.plot(self.hypoX, self.hypoY)
|
||||
self.canvas.draw_idle()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue