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-2.0.4.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

vpython-2.0.4-cp35-cp35m-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.5mWindows x86-64

vpython-2.0.4-cp35-cp35m-win32.whl (2.5 MB view details)

Uploaded CPython 3.5mWindows x86

vpython-2.0.4-cp35-cp35m-macosx_10_7_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.5mmacOS 10.7+ x86-64

vpython-2.0.4-cp34-cp34m-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.4mWindows x86-64

vpython-2.0.4-cp34-cp34m-win32.whl (2.5 MB view details)

Uploaded CPython 3.4mWindows x86

vpython-2.0.4-cp34-cp34m-macosx_10_6_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-2.0.4-cp27-cp27m-macosx_10_7_x86_64.whl (2.5 MB view details)

Uploaded CPython 2.7mmacOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: vpython-2.0.4.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vpython-2.0.4.tar.gz
Algorithm Hash digest
SHA256 93c362746438a5092475de0fca9a08c67f7fa79e0929054d2272d46209adee54
MD5 b9e899e1f26f5a05e374e7e539918df1
BLAKE2b-256 a2fa89d9de0db6d097e162089aad04e7389c19089a8afd56aefa5d07cdd6102f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-2.0.4-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 26621469d8a240327fdcefb283d572721b99037b1bf58975263cdcb7d78ec3c0
MD5 e6721e33ef236a391d40ff5ac06ec91f
BLAKE2b-256 0d5d4eeae31eb7b89d05306e70c9f586bbbb1ab43fe86e42460f253080dc89c9

See more details on using hashes here.

File details

Details for the file vpython-2.0.4-cp35-cp35m-win32.whl.

File metadata

File hashes

Hashes for vpython-2.0.4-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 1c743678d1e8e59d02ca28bfd93f89197e3216debd16814781726a3f55a8d307
MD5 af9caeefbc9c80d368b289a25a6f5a78
BLAKE2b-256 05deaa2373acfcd11a95b7180acd20ae654b757f56ec5d7867360ce22ab6b2a8

See more details on using hashes here.

File details

Details for the file vpython-2.0.4-cp35-cp35m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vpython-2.0.4-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 438beed96dad788a9bda42b8691de6792d0f69e5ccf9b207c43fee73c9346698
MD5 9bd91d02e3e1414ed43d08c89775fa35
BLAKE2b-256 419a9ef091d631f39351039460ff36a6de0a7c1ca3fd30824e8179ac35cfeab9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-2.0.4-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 95033b88d130d0524593201def2348e3d0eb0cdd0086ce76b33ba1480bef4d0b
MD5 805f290695b1725a34acc7f252e5bb23
BLAKE2b-256 d398e13dffb14e05e85443d23e02ce50fc4c1b696e4fff4c66540395726b378d

See more details on using hashes here.

File details

Details for the file vpython-2.0.4-cp34-cp34m-win32.whl.

File metadata

File hashes

Hashes for vpython-2.0.4-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 60510c860da5d6712203a7f8245f31d88f3d976f8acd6397cbb4bca9dc37882a
MD5 4b1c2bb7560efd836753abf0cfbfeae2
BLAKE2b-256 925abfbb68ad9465adff9df19a67009accce0a58b8c19d3bcc3fa3604dd05539

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-2.0.4-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 8fe39c199b93dc914c1123e962ac05dff1ba805febd1603289922ce4ee8d2eb0
MD5 4591016cc2b9c395f57a082e2cccd49b
BLAKE2b-256 90cde23b8165118fc174da04d33c888723d4812a8e50a70663686df3717f8c4e

See more details on using hashes here.

File details

Details for the file vpython-2.0.4-cp27-cp27m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vpython-2.0.4-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 de5948db35779cc88b00177c92ae3b79b437b4f2eda3f890c9cc8dcbd9e33d42
MD5 a81c5c75bf222af5731fe08786cf2cad
BLAKE2b-256 2380b8828e9edd6cd798d0b63146f619a14942d8e7f91b210fa752801ba6b5e5

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