Commits

German Larrain committed 4754850

docs.index.example: updated code; changed text; added keys to end the simulation.

  • Participants
  • Parent commits 01eb972

Comments (0)

Files changed (1)

File docs/sphinx/source/index.rst

 
 So simple
 ----------
-To create your first simulation, a few lines of code are enough! Run the
-following script ::
+To create and run your first simulation, a few lines of code are enough!
+Execute the following script (press key ``q`` or ``e`` to end the simulation) ::
 
    from ars.app import Program
 
 
       def create_sim_objects(self):
          # add_sphere's arguments: radius, center, density
-         self.sim.add_sphere(0.5, (1,10,1), density=1)
+         self.sim.add_sphere(0.5, (1, 10, 1), density=1)
 
-   if __name__ == '__main__':
-      sim_program = FallingBall()
-      sim_program.start()
+   sim_program = FallingBall()
+   sim_program.start()
+   sim_program.finalize()
 
 
 ..