MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / main

Function main

pySPlisHSPlasH/examples/plot.py:30–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 counter += 1
29
30def main():
31 plt.xlabel('time (s)')
32 plt.ylabel('velocity (m/s)')
33 plt.title('Example plot')
34 plt.grid(True)
35 plt.ion()
36 plt.plot([0.0], [0.0], 'b')
37 plt.draw()
38 plt.pause(0.001)
39 plt.show()
40
41 base = sph.Exec.SimulatorBase()
42 base.init()
43 gui = sph.GUI.Simulator_GUI_imgui(base)
44 base.setGui(gui)
45
46 base.setTimeStepCB(time_step_callback)
47
48 # init the simulation
49 base.initSimulation()
50
51 sim = sph.Simulation.getCurrent()
52 sim.setValueBool(sim.ENABLE_Z_SORT, False)
53
54 base.runSimulation()
55 base.cleanup()
56
57if __name__ == "__main__":
58 main()

Callers 1

plot.pyFile · 0.70

Calls 9

initMethod · 0.95
setGuiMethod · 0.95
setTimeStepCBMethod · 0.95
initSimulationMethod · 0.95
runSimulationMethod · 0.95
cleanupMethod · 0.95
Simulator_GUI_imguiMethod · 0.80
SimulatorBaseMethod · 0.45
getCurrentMethod · 0.45

Tested by

no test coverage detected