pydy/pydy — pull request #82 by tarzzz (2014-08-01 08:57:21+00:00)
Title: Motion view dev

This branch contains some major changes in the `pydy.viz` module. Which I am listing here. I am opening this Pull request to have a final review before it is merged. @moorepants @chrisdembia @jcrist @srjoglekar246

P.S: I am working on JS-Testing in a separate branch #74 I plan to get this one merged once that is complete, and merged into `motion-view-dev`.

- A new, better UI.
- Integration with IPython notebooks. For rendering the visualizer inside the IPython notebooks, simply call `scene.display_ipython` from a notebook. (Works only on latest master of IPython).
- Now rendered objects can be modified from the UI itself(using `edit objects` button in UI), and new JSON will be generated, which can be viewed by clicking `view model` button in UI.
- Added a new property "material" to the rendered shapes (`Shape` object).
- Allows rerunning the simulations(after changing the simulation parameters) from the visualizer itself. This feature is partially implemented, but will be fully functional once `System` class comes in.
- Javascript backend completely modified. Now it is object oriented using Prototype.js.

**Instructions for building this branch with latest IPython, and testing the new features:**

1. Cloning and installing latest IPython:

$ git clone https://github.com/ipython/ipython ipython-dev
$ cd ipython-dev
$ git submodule update
$ pip install -e .

2. get this branch from git repo:

$ git checkout --track origin/motion-view-dev

3. Add it to PYTHONPATH.

$ export $PYTHONPATH="/your/pydy/repo/:$PYTHONPATH"

4. Now you can check out the `double_pendulum` example.
- cd to examples/double_pendulum
- comment out the last line in visualize.py, this one: https://github.com/pydy/pydy/blob/motion-view-dev/examples/double_pendulum/visualize.py#L64
- open `$ ipython notebook`
- from the notebook call:

from visualize import *
scene.display_ipython()

Please feel free to contact me, if there are any difficulties!!