VPython for Jupyter Notebook
Project description
# VPython
This package enables one to run VPython in a browser, using the GlowScript
VPython API, documented in the Help at http://glowscript.org. If the code is
in a cell in a Jupyter notebook, the 3D scene appears in the Jupyter notebook.
If the code is launched outside a notebook (e.g. from the command line), a
browser window will open displaying the scene.
VPython makes it unusually easy to create navigable real-time 3D animations.
The one-line program "sphere()" produces a 3D sphere with appropriate lighting
and with the camera positioned so that the scene fills the view. It also
activates mouse interactions to zoom and rotate the camera view. This
implementation of VPython was begun by John Coady in May 2014. Ruth Chabay and
Bruce Sherwood are assisting in its further development. The repository for
the source code is at https://github.com/BruceSherwood/vpython-jupyter.
## Installation
For more detailed instructions on how to install vpython, see http://vpython.org.
Briefly:
+ If you use the [anaconda python distribution](https://www.continuum.io/anaconda-overview), install like this: `conda install -c vpython vpython`
+ If you use any other python distribution, install this way: `pip install vpython`
## Sample program
Here is a simple example:
```python
from vpython import *
sphere()
```
This will create a canvas containing a 3D sphere, with mouse and touch
controls available to zoom and rotate the camera:
Right button drag or Ctrl-drag to rotate "camera" to view scene.
To zoom, drag with middle button or Alt/Option depressed, or use scroll wheel.
On a two-button mouse, middle is left + right.
Touch screen: pinch/extend to zoom, swipe or two-finger rotate.
Run example VPython programs: [![Binder](http://mybinder.org/badge.svg)](http://mybinder.org/repo/BruceSherwood/vpython-jupyter)
## vpython build status (for the vpython developers)
[![Build Status](https://travis-ci.org/BruceSherwood/vpython-jupyter.svg?branch=master)](https://travis-ci.org/BruceSherwood/vpython-jupyter) [![Build status](https://ci.appveyor.com/api/projects/status/wsdjmh8aehd1o0qg?svg=true)](https://ci.appveyor.com/project/mwcraig/vpython-jupyter)
This package enables one to run VPython in a browser, using the GlowScript
VPython API, documented in the Help at http://glowscript.org. If the code is
in a cell in a Jupyter notebook, the 3D scene appears in the Jupyter notebook.
If the code is launched outside a notebook (e.g. from the command line), a
browser window will open displaying the scene.
VPython makes it unusually easy to create navigable real-time 3D animations.
The one-line program "sphere()" produces a 3D sphere with appropriate lighting
and with the camera positioned so that the scene fills the view. It also
activates mouse interactions to zoom and rotate the camera view. This
implementation of VPython was begun by John Coady in May 2014. Ruth Chabay and
Bruce Sherwood are assisting in its further development. The repository for
the source code is at https://github.com/BruceSherwood/vpython-jupyter.
## Installation
For more detailed instructions on how to install vpython, see http://vpython.org.
Briefly:
+ If you use the [anaconda python distribution](https://www.continuum.io/anaconda-overview), install like this: `conda install -c vpython vpython`
+ If you use any other python distribution, install this way: `pip install vpython`
## Sample program
Here is a simple example:
```python
from vpython import *
sphere()
```
This will create a canvas containing a 3D sphere, with mouse and touch
controls available to zoom and rotate the camera:
Right button drag or Ctrl-drag to rotate "camera" to view scene.
To zoom, drag with middle button or Alt/Option depressed, or use scroll wheel.
On a two-button mouse, middle is left + right.
Touch screen: pinch/extend to zoom, swipe or two-finger rotate.
Run example VPython programs: [![Binder](http://mybinder.org/badge.svg)](http://mybinder.org/repo/BruceSherwood/vpython-jupyter)
## vpython build status (for the vpython developers)
[![Build Status](https://travis-ci.org/BruceSherwood/vpython-jupyter.svg?branch=master)](https://travis-ci.org/BruceSherwood/vpython-jupyter) [![Build status](https://ci.appveyor.com/api/projects/status/wsdjmh8aehd1o0qg?svg=true)](https://ci.appveyor.com/project/mwcraig/vpython-jupyter)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vpython-7.0.1.tar.gz
(2.5 MB
view hashes)
Built Distributions
Close
Hashes for vpython-7.0.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c9e5803e781aa36e5a6612915cf6a3ddec6671088f75dbcdc28852a7ffbf554 |
|
MD5 | 31ed86462aa83e52b776f6fa1b6f164b |
|
BLAKE2b-256 | 67bdc69e730eb06e91621b3c1eb29f3cb98094827f13c96bc8ed6a62d4960e9b |
Close
Hashes for vpython-7.0.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38b466b525d36f9323ce1f0ae02340ad608e395a7d1ec71a2cb892f7e5382784 |
|
MD5 | 98c261402752179291db423b19221ee3 |
|
BLAKE2b-256 | 3764406428d9df717e50fb36c43bcd9c0fca596667bb34464a53d358df4d4a1d |
Close
Hashes for vpython-7.0.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 074687bd68517c14873e1ca25b8b480f1fdf48adf9ef962dd16932382d5f393b |
|
MD5 | 29b6a325d544910404cb884492c59967 |
|
BLAKE2b-256 | a4ebcdb4e40778ad0f39399f434759f3e5777cab7ccbb0cb1c39e2812a0ed2fe |
Close
Hashes for vpython-7.0.1-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8ecb8032b1cb00429b49975402475dffbd4367f502725f78cdd4a161709bc87 |
|
MD5 | 756f6bfc6384c160bd11efc1cdcb2cad |
|
BLAKE2b-256 | f3374f2affdb7d243b24a942242613f07a19749c46ec2bbd2e6da28b3806ce10 |
Close
Hashes for vpython-7.0.1-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44913ef553e6f31bcefc021c5d73920dc4a0f52d1a33d90e8fce66b369b1b16f |
|
MD5 | c8ba986acf2d329a519eb8036d0ab784 |
|
BLAKE2b-256 | 4104af9b31755767bd4c59fa97e385c8c16ca80f7f5f6ae36b37c261c5b1dce2 |
Close
Hashes for vpython-7.0.1-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acbc1c98c855d111bc9669bc316fa2fe7367d4d0f1883bef6bfeeaef12aba9a1 |
|
MD5 | 16e1b032dd17f18c58194456c7d7e55f |
|
BLAKE2b-256 | e8f3c3dd591d0dd71c5d4688f40f7f8e944c91f145c3f83db7780468cb767214 |
Close
Hashes for vpython-7.0.1-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5b0ac2b570176629ff62dfbf78a59f1a98eaf368b1a99ec26be2a7e7daa28e5 |
|
MD5 | 8d1bef015e94137b61302210a165853d |
|
BLAKE2b-256 | f315814455faad3ccf60bae58de5bcacc773edf4d5394f7e9a1ce422bae761af |
Close
Hashes for vpython-7.0.1-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17cb2f235119aac728df6decc5cc9d3e8a128ee4ce346a9b00d01cbe09f0a290 |
|
MD5 | bf1227b7d614ce9fe71c41d76723b1b0 |
|
BLAKE2b-256 | b698884a80eca9cc884711d017719aab11dc971d6e1bea21d35ebdd69c9ee04e |
Close
Hashes for vpython-7.0.1-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88ed9da349d9ff96732a6ac70742d668b61d37b1af87160f650e139494cb6e83 |
|
MD5 | 418fdb3ba6638558bdd8b2a1031b91f9 |
|
BLAKE2b-256 | 0498ba313236b185326269b1278465850506427d57749ef01451f4ead10802b2 |
Close
Hashes for vpython-7.0.1-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42ae1fedc1b30478174092cf2b299cb7155a7c89d2da7878ae01d4d35869e0aa |
|
MD5 | 712f816f15d8d3652909b41d9fb0cd70 |
|
BLAKE2b-256 | e1d1dfc3989b2884f0e7725dd390dbc2df0ba108962c46d1fbbb34bf69579b9a |
Close
Hashes for vpython-7.0.1-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41d016251d0754de45ac8132e0bf726e42d9b49fce0318d077dc6a99a7e528f3 |
|
MD5 | 7bfc1c3adf32eca474e1121469feb185 |
|
BLAKE2b-256 | aaa155160455bb6f491dccd67b748c8a2dccd82d94c303fb4e54130f7fb204c9 |
Close
Hashes for vpython-7.0.1-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0816774eafe082a9ab32492ff312ccaa4afc535e2f1e840fb266f4b7b2842827 |
|
MD5 | 791ab9f35e62c600685e6b3c43ce1a9f |
|
BLAKE2b-256 | c635f8b8878d551f9bd95b1b985cfd426413e22064f2983210c5e12892836389 |