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

Uploaded Source

Built Distributions

vpython-1.0.4-cp35-cp35m-macosx_10_6_x86_64.whl (303.7 kB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

vpython-1.0.4-cp34-cp34m-macosx_10_6_x86_64.whl (303.5 kB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-1.0.4-cp27-cp27m-macosx_10_6_x86_64.whl (304.3 kB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vpython-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d34eb8f59d28e2313416f3f01fe75b015127555f9cdfc23954625b66f789455b
MD5 dfc31b0e87667cfab3dec51320edcab2
BLAKE2b-256 65dd788ac79ced511bf86b36edeb15361b7ad84c30814adb6b425f4b814fe02c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.4-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 3bf6205638dfa1faeb09376138a0ce7426cf7f5681d5182aaf2332cd31ebd8ee
MD5 44e7f98e8920780a06effc43c1714235
BLAKE2b-256 e6e077dcb51150f62a462f773e5b020506fd46d3145b34452ecf91e992a8c2ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.4-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 18ea58fed16b352d01265a4faf4bdbf671bf3ff73b10066c859bea0a3635c24e
MD5 632baaea570c234fdcc0566e2eca0344
BLAKE2b-256 815ee23aec849b150c1e74a1f808bef12441f2e7bb84f13ec13db4f6216d05d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.4-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 4a8d0045906d4c285d8eb42af72f38c67329e832aa0f0f699c294e9500466e2b
MD5 06973dcd61332f082694961f41698878
BLAKE2b-256 76a51170312101ddfeeab283f2c6ca7cc41da41cf7cbb2dace074596ddeda32f

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