Skip to main content

VPython for Jupyter Notebook

Project description

# VPython

This package enables one to run VPython in a browser, using the GlowScript
VPython API, documented in the Help at http://glowscript.org. If the code is
in a cell in a Jupyter notebook, the 3D scene appears in the Jupyter notebook.
If the code is launched outside a notebook (e.g. from the command line), a
browser window will open displaying the scene.

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. 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.

## Installation

For more detailed instructions on how to install vpython, see http://vpython.org, where you will also find a link to the VPython forum, which is the preferred place to report issues and to request assistance.

Briefly:

+ If you use the [anaconda python distribution](https://www.continuum.io/anaconda-overview), install like this: `conda install -c vpython vpython`
+ If you use any other python distribution, install this way: `pip install vpython`

## Sample program

Here is a simple example:

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

This will create a canvas 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.
Shift-drag to pan left/right and up/down.
Touch screen: pinch/extend to zoom, swipe or two-finger rotate.

Currently, to re-run a VPython program you need to click the circular arrow icon to "restart the kernel" and then click the red-highlighted button, then click in the first cell, then click the run icon. Alternatively, if you insert "scene = canvas()" at the start of your program, you can rerun the program without restarting the kernel.

Run example VPython programs: [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/BruceSherwood/vpython-jupyter/7.1.2?filepath=index.ipynb)

## vpython build status (for the vpython developers)

[![Build Status](https://travis-ci.org/BruceSherwood/vpython-jupyter.svg?branch=master)](https://travis-ci.org/BruceSherwood/vpython-jupyter) [![Build status](https://ci.appveyor.com/api/projects/status/wsdjmh8aehd1o0qg?svg=true)](https://ci.appveyor.com/project/mwcraig/vpython-jupyter)

Project details


Release history Release notifications | RSS feed

This version

7.4.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vpython-7.4.5.tar.gz (3.4 MB view details)

Uploaded Source

Built Distributions

vpython-7.4.5-cp36-cp36m-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.6mWindows x86-64

vpython-7.4.5-cp36-cp36m-win32.whl (3.4 MB view details)

Uploaded CPython 3.6mWindows x86

vpython-7.4.5-cp36-cp36m-macosx_10_7_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

vpython-7.4.5-cp35-cp35m-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.5mWindows x86-64

vpython-7.4.5-cp35-cp35m-win32.whl (3.4 MB view details)

Uploaded CPython 3.5mWindows x86

vpython-7.4.5-cp35-cp35m-macosx_10_6_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

vpython-7.4.5-cp34-cp34m-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.4mWindows x86-64

vpython-7.4.5-cp34-cp34m-win32.whl (3.4 MB view details)

Uploaded CPython 3.4mWindows x86

vpython-7.4.5-cp34-cp34m-macosx_10_6_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-7.4.5-cp27-cp27m-win_amd64.whl (3.4 MB view details)

Uploaded CPython 2.7mWindows x86-64

vpython-7.4.5-cp27-cp27m-win32.whl (3.4 MB view details)

Uploaded CPython 2.7mWindows x86

vpython-7.4.5-cp27-cp27m-macosx_10_6_x86_64.whl (3.4 MB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

  • Download URL: vpython-7.4.5.tar.gz
  • Upload date:
  • Size: 3.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5.tar.gz
Algorithm Hash digest
SHA256 ef434a9ba7ed34ab763f73920bf12defc71347fba647c6662a12b09a1df6ac67
MD5 4bdbb383ea642fff1002b07337d43b72
BLAKE2b-256 1f0a9a0e84adfdd1eea40d6c9ccb74b3ec4a3e80c1ce073e796714f227891007

See more details on using hashes here.

File details

Details for the file vpython-7.4.5-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: vpython-7.4.5-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 c4a209fc9f96acf54282282a02a9ad8854da9519f1be6a6c204430b2b514c124
MD5 5ac848f3850297e3a6e2bf2872f8e66d
BLAKE2b-256 07526d7b8a383ef79e2a5c14d9bad3dcd735b7d2e3f45f6243cc6ba3c8b3e765

See more details on using hashes here.

File details

Details for the file vpython-7.4.5-cp36-cp36m-win32.whl.

File metadata

  • Download URL: vpython-7.4.5-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 f05fe7f3044f0f8a59b2afe30a2e2a7a7d77c900d63b4c71b217f58c061fd91b
MD5 2aa187c03d6dc77261db531ddd034f28
BLAKE2b-256 c5b79aa7a2c6fe536d2f534d7cbc5b705f1eb5944c8092228e43edd5d92cab49

See more details on using hashes here.

File details

Details for the file vpython-7.4.5-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: vpython-7.4.5-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 5109778570615482f7ffccd0e8052ec00f544bc51d7a6317ca1091445a2e71d5
MD5 e8d0bc10c3ff44ae5cc24bc4a1d9af3d
BLAKE2b-256 250dbf5012661609d3e73bae48e0f17b98c99e00d15519c97d565e4525750f39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.14.2 setuptools/27.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.5

File hashes

Hashes for vpython-7.4.5-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 807d3f4381fa22f19c30cc0ae5472b117dd7516e79e6978dc140f51357197407
MD5 ecedc22c00eeb7cac75386e5507ce4b2
BLAKE2b-256 1e528c58a460b42f94ff59db9e3fc94f52c84fc27fde3c107f308c3cef0da27e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.14.2 setuptools/27.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.5.2

File hashes

Hashes for vpython-7.4.5-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 f73f505471b51c118eab9021cfa99c93b119fd69cd52c978838bec32d4808597
MD5 33ed7361d06d037af78f88a7ba27b7be
BLAKE2b-256 97f55b8e4dca76e306eb396a0748f890275deb925c18a55ed18f66c94b533718

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp35-cp35m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.5m, macOS 10.6+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 984d3af5b60f8a6e48ebba34f06ac06fce88da93a64655ac96e4b2dd4757b00b
MD5 1e1d8f9e50ec3557b63d25eec45c5be4
BLAKE2b-256 e232ed701047d6409ae0bd4bff95c2017c3f31c18cbc722f7bcf88bc22df0aa9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp34-cp34m-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.4m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 12e67e03d1d9078f013fdda5f4a2b666b957e617942ef50e8e14e68e1a1c7369
MD5 697d1f4a7d7e920dc3a699ad700b92c0
BLAKE2b-256 2ac05dcd259bf08216e369ca75f0a4bfc4b244d3e2671ac598b0f4c578ae91b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp34-cp34m-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.4m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 7f8af725c48033f9bbe3dbc78c3b5813123c01e6cf5e7b7358f8f516a48c762c
MD5 a770ef8296a40801128a28e09ba8e0b1
BLAKE2b-256 9ca354b55afcd9fa8abee382b4bfbc6cec811b895f77b2f19aee1cba61a7104d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp34-cp34m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 3.4m, macOS 10.6+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 95d115f97d4edbb3b347036c83ec69601d02fa87f0f5e67b71e236ced3b11efe
MD5 6f287084202dd3aaca79a634a5ce971b
BLAKE2b-256 f0a7004bd13f52e4e4ad4f4cdb6f5066843de8a1895ebb02d43d9bdd1aa16505

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.14

File hashes

Hashes for vpython-7.4.5-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 5687268d6d0be12e863e034c25167efbb35f73468fca82b735b1f1455eacf67f
MD5 213b730888b11fa24b0cdcaa45d30481
BLAKE2b-256 bf1d1cd8d481b1ecc37369408da6588e7ece6513f3c710a18bce3c0d4663d158

See more details on using hashes here.

File details

Details for the file vpython-7.4.5-cp27-cp27m-win32.whl.

File metadata

  • Download URL: vpython-7.4.5-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.14

File hashes

Hashes for vpython-7.4.5-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 0c32ba87b97438976ab9250bfa1f343808e4f9662fd0d96f3ec07a7c649226cf
MD5 4cca8393276c58b8b88e90341d0cb167
BLAKE2b-256 1630aa805f1c6cd45ace2a6162ecd67315ee8768431e2b22650a624fbbd2489d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.5-cp27-cp27m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: CPython 2.7m, macOS 10.6+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

File hashes

Hashes for vpython-7.4.5-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 d4acdd276ce4c7e9c2d116d7d2ace4b868f3422fd6e477d34200a7890d12f437
MD5 8309011a079d7a1be902d90ca1004b2e
BLAKE2b-256 642766150d02a984c64a226ac951acb6ccb972486b667a6aeceeefbe6edfaf81

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