Skip to main content

VPython for Jupyter Notebook

Project description

# VPython
This package enables one to run VPython in a Jupyter notebook, using the GlowScript VPython API, documented in the Help at http://glowscript.org. 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. The 3D scene appears in the Jupyter notebook, using the WebGL-based GlowScript 3D graphics library. 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.

For instructions on how to install Jupyter VPython, see http://vpython.org.

Here is a simple example that will run in a Jupyter Notebook cell:

```python
from vpython import *
sphere()
```

This will create a 3D window in the Notebook 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)

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-1.0.1.tar.gz (273.5 kB view details)

Uploaded Source

Built Distributions

vpython-1.0.1-cp35-cp35m-win_amd64.whl (259.2 kB view details)

Uploaded CPython 3.5mWindows x86-64

vpython-1.0.1-cp35-cp35m-macosx_10_6_x86_64.whl (263.9 kB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

vpython-1.0.1-cp34-cp34m-win_amd64.whl (259.0 kB view details)

Uploaded CPython 3.4mWindows x86-64

vpython-1.0.1-cp34-cp34m-macosx_10_6_x86_64.whl (263.7 kB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-1.0.1-cp27-cp27m-win_amd64.whl (260.8 kB view details)

Uploaded CPython 2.7mWindows x86-64

vpython-1.0.1-cp27-cp27m-macosx_10_6_x86_64.whl (264.5 kB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

Details for the file vpython-1.0.1.tar.gz.

File metadata

  • Download URL: vpython-1.0.1.tar.gz
  • Upload date:
  • Size: 273.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vpython-1.0.1.tar.gz
Algorithm Hash digest
SHA256 41608ad15e8b9a2adb0b0098e39da9f429305060e583a87f90ae878ae6e38aae
MD5 c2765c1d787bb008e54ad654668e90b5
BLAKE2b-256 51fa01ccce6c1317e0a89e751ee25c310f10d3ed81ad552ad08aa21c6ce7f63d

See more details on using hashes here.

File details

Details for the file vpython-1.0.1-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for vpython-1.0.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 a71b5be0880096a2b6963d291edccc5622f770558f3485bb54db3054bcd02f48
MD5 e957c4927dab349bf97a110d1a146182
BLAKE2b-256 80636ff108e643228adf1962c2a0950b81e1dada4df3e0eec7bf7db74b80ad0f

See more details on using hashes here.

File details

Details for the file vpython-1.0.1-cp35-cp35m-macosx_10_6_x86_64.whl.

File metadata

File hashes

Hashes for vpython-1.0.1-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 3e2dadc1877d1d46c6ee305c5abf273db495fa3357e5274e8eec5ff1c3f75e35
MD5 6859c62f1350ae416bd2a7386f8e26ac
BLAKE2b-256 bf549f5215ae7f4671e61d2d5bb0ecbce8b579a174e9c8238d8b3526a7ca638f

See more details on using hashes here.

File details

Details for the file vpython-1.0.1-cp34-cp34m-win_amd64.whl.

File metadata

File hashes

Hashes for vpython-1.0.1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 29c9c1b6f44644dc074c1f2cf67cf5bb662c8d76f6574c808673af67378a6d55
MD5 e721673070c9d9b75762c54cc10424e8
BLAKE2b-256 603987906b21873740cac1f3463f2d1df7181b452c72c0b5b11283da5f22911d

See more details on using hashes here.

File details

Details for the file vpython-1.0.1-cp34-cp34m-macosx_10_6_x86_64.whl.

File metadata

File hashes

Hashes for vpython-1.0.1-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 9402c0a7dbcff7dc7dedfaf02e91fcaf6422bd95c1bf1d95dcf90ba292dbd6fc
MD5 201a445076140db8f99177d0be17fee2
BLAKE2b-256 834a9963caf6ac2d6a9a26e99960e27bbfa2ae21685b8f89fa0ce16515036cc6

See more details on using hashes here.

File details

Details for the file vpython-1.0.1-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for vpython-1.0.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 f2cdc41cd78e25fd116e2d908bd0be7dbf9f06c9b31c330b4e2f840fa76c3ff0
MD5 2d2f3e406e5252fb19370311597e6e6b
BLAKE2b-256 d040949131e46b0c1d15a9b07d4b46ae1544066199d6dcdaa9fbee6bd44cff0a

See more details on using hashes here.

File details

Details for the file vpython-1.0.1-cp27-cp27m-macosx_10_6_x86_64.whl.

File metadata

File hashes

Hashes for vpython-1.0.1-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 f0568fd5a2286730ec5666442027de43e60122f439271ec4eeddf7b3b6fc1d8f
MD5 63e5f5fe9b4fe8b5dccfd97d5048a7f1
BLAKE2b-256 ff15b04b8e598955e1325bf8a5d571f09c3147fa48a1dd5aa95acf7d840d710f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page