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 Distributions

vpython-0.3.8.zip (225.7 kB view details)

Uploaded Source

vpython-0.3.8.tar.gz (257.7 kB view details)

Uploaded Source

Built Distributions

vpython-0.3.8-cp35-cp35m-macosx_10_5_x86_64.whl (257.8 kB view details)

Uploaded CPython 3.5mmacOS 10.5+ x86-64

vpython-0.3.8-cp34-cp34m-macosx_10_5_x86_64.whl (257.7 kB view details)

Uploaded CPython 3.4mmacOS 10.5+ x86-64

vpython-0.3.8-cp27-cp27m-macosx_10_5_x86_64.whl (258.7 kB view details)

Uploaded CPython 2.7mmacOS 10.5+ x86-64

File details

Details for the file vpython-0.3.8.zip.

File metadata

  • Download URL: vpython-0.3.8.zip
  • Upload date:
  • Size: 225.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vpython-0.3.8.zip
Algorithm Hash digest
SHA256 c2e2470b60100e430fc967b11138a8e3f67ebd1aa60a27fcc9a4e89389784809
MD5 e1b17881ea90796bf4513c969d116a74
BLAKE2b-256 ac711c656cfdb2a078a87c2814c935a7cef686d30e5d71dfca473f8b93971193

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for vpython-0.3.8.tar.gz
Algorithm Hash digest
SHA256 f7c9c7c2ef56593274818de7c7351c6fa600fcfe2150899ae7bdd5f4b9c0e030
MD5 ba8de271f0887dd83f31889c3d19ccc3
BLAKE2b-256 3e64d7ff7a8eb08e0c2b81f2c691d2a0629073c084b320f43433139fb700d1f5

See more details on using hashes here.

File details

Details for the file vpython-0.3.8-cp35-cp35m-macosx_10_5_x86_64.whl.

File metadata

File hashes

Hashes for vpython-0.3.8-cp35-cp35m-macosx_10_5_x86_64.whl
Algorithm Hash digest
SHA256 f4b63695fcfb91f899f14a391e032de110e644fdb2654486961edf064603b85e
MD5 7910c47ebcc763b42bf7f2f13c093270
BLAKE2b-256 675413e254f9b6ff006b62b07191ff24c7c5bbe66c083cfeefc678d10d2ffe7f

See more details on using hashes here.

File details

Details for the file vpython-0.3.8-cp34-cp34m-macosx_10_5_x86_64.whl.

File metadata

File hashes

Hashes for vpython-0.3.8-cp34-cp34m-macosx_10_5_x86_64.whl
Algorithm Hash digest
SHA256 5d7c71737862a94421e0ec201c05fcddfb54532441a2defbe4982623563088dc
MD5 aca4f89620a85e24bf132d86ad796de8
BLAKE2b-256 218872eb40d6deabfbcc63896ffdca4827a93e5478225d8c7f14ca544d8caf38

See more details on using hashes here.

File details

Details for the file vpython-0.3.8-cp27-cp27m-macosx_10_5_x86_64.whl.

File metadata

File hashes

Hashes for vpython-0.3.8-cp27-cp27m-macosx_10_5_x86_64.whl
Algorithm Hash digest
SHA256 bc641aaad6632c7d81c8c3f91b43a11c97e75e8e0181ae6adbd3ea4d294df699
MD5 bf768158f3754e893a239fa3796e6384
BLAKE2b-256 9abb608485b88591161ef89fb9acb9ecbe176d9982cadc858e80c835de04204c

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