本文整理汇总了Python中simulation.Simulation.plot_system方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.plot_system方法的具体用法?Python Simulation.plot_system怎么用?Python Simulation.plot_system使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simulation.Simulation
的用法示例。
在下文中一共展示了Simulation.plot_system方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Earth
# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import plot_system [as 别名]
from simulation import Simulation
"""
Stable Orbit about Earth (alpha, vkick)
=======================================
(x, 0)
Moon Hits
=========
(235, 3.023), (30, 3.003)
Interesting Paths
=================
(240, 3.0263)
"""
# Initial angular position of the lander in orbit about Earth
alpha = np.radians(30.)
# Initial velocity boost to kick the lander out of Earth orbit..
# Units are in terms of the Earth-Moon distance.
vkick = 3.003
MAX_ITERATIONS = int(1E+5)
# The name used for this simulation.
sim_name = "lander_sim"
s = Simulation(alpha, vkick, MAX_ITERATIONS, sim_name)
s.run()
s.write_data(sim_name + "_data.txt")
s.plot_system()
s.plot_lander_moon_distance()