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

This version

1.0.0

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

Uploaded Source

Built Distributions

vpython-1.0.0-cp35-cp35m-win_amd64.whl (259.1 kB view details)

Uploaded CPython 3.5mWindows x86-64

vpython-1.0.0-cp35-cp35m-macosx_10_6_x86_64.whl (263.7 kB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

vpython-1.0.0-cp34-cp34m-win_amd64.whl (258.9 kB view details)

Uploaded CPython 3.4mWindows x86-64

vpython-1.0.0-cp34-cp34m-macosx_10_6_x86_64.whl (263.5 kB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

vpython-1.0.0-cp27-cp27m-macosx_10_6_x86_64.whl (264.4 kB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vpython-1.0.0.tar.gz
Algorithm Hash digest
SHA256 700d9465092f8120beec8ba209cb4f7d5d4291fda3fbe4457e533ead1ce3249f
MD5 cf27513926b06658d8ea07f4e2472212
BLAKE2b-256 d12a82fe4457397cdab43e0eed8a0fd258ab3f6608bee43776652ba473e02181

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 ef1c15e3bd5421a563ebe1fd9b2bfe8aff25e7ce91a07632b3a632ee012f5e3c
MD5 6e7087dd635ea37e26e86b826e18cecd
BLAKE2b-256 d1a4307271c82804575d3a7805f2a1e1e800b18a01a0642cae8058d121c50417

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.0-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 f34e54365e4d576d8c870e6d26f8485c23aecd7572f97ca5ff0d551209bbf63c
MD5 4feda3c1162d11efeef47624ef9bda12
BLAKE2b-256 45d57b792f58892d8eb24816eec9559a829b9e52921125c69679b0d9083e9cd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 421308c880ac692402598bd84cc926aa3eda8706c861ced9e2d3cd27130e28d1
MD5 910259c1ad5e970b9b1e9f1786e70fd2
BLAKE2b-256 ae2b85747f922f2636a6c475aa4e7d6a0cbf7c03682ddb0acdc97627348393d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.0-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 a84268b133b91a65d00c0818d58093a246c6013d140f0456d935858f87a4e8c3
MD5 0649eac2b39bacedb5cb48889e5b1693
BLAKE2b-256 4b7155d4022854c0341f312154b29c2f828a10e60802bea62ba99b1ad5f220e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 44d6397d2e19b8affd10ff2879beae32a3e30988ecd24542b0c3d636c43a5ddf
MD5 a15c582e984672011fc90a145957792e
BLAKE2b-256 173dcb736fd30eaa8ec84a156d8c445fd73590699f20b7d709f9ba4bcec942f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.0-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 efc966ddd964e651785ce30fc1b09d3cc18087b4bc5244c342ad36e7e8762bfa
MD5 227b284194be23f4186e062523c9e873
BLAKE2b-256 45dbad120a7ec0d36c7143064e7d0d75ebdae48a8f3d6a48e06a6aa7c0a38883

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