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/master?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

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

Uploaded Source

Built Distributions

vpython-7.4.6-cp36-cp36m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.6mWindows x86-64

vpython-7.4.6-cp36-cp36m-win32.whl (3.5 MB view details)

Uploaded CPython 3.6mWindows x86

vpython-7.4.6-cp36-cp36m-macosx_10_7_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

vpython-7.4.6-cp35-cp35m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.5mWindows x86-64

vpython-7.4.6-cp35-cp35m-win32.whl (3.5 MB view details)

Uploaded CPython 3.5mWindows x86

vpython-7.4.6-cp35-cp35m-macosx_10_6_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

vpython-7.4.6-cp34-cp34m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.4mWindows x86-64

vpython-7.4.6-cp34-cp34m-win32.whl (3.5 MB view details)

Uploaded CPython 3.4mWindows x86

vpython-7.4.6-cp34-cp34m-macosx_10_6_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-7.4.6-cp27-cp27m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 2.7mWindows x86-64

vpython-7.4.6-cp27-cp27m-win32.whl (3.5 MB view details)

Uploaded CPython 2.7mWindows x86

vpython-7.4.6-cp27-cp27m-macosx_10_6_x86_64.whl (3.5 MB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

  • Download URL: vpython-7.4.6.tar.gz
  • Upload date:
  • Size: 3.5 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.6.tar.gz
Algorithm Hash digest
SHA256 fd22b886489ec546adc3236c42d1717c83ad73e68db5d87ac447fadf8ee079c4
MD5 0077f7082dfe199269bfc75f8d5c5155
BLAKE2b-256 c093c200bbe24fa5286b564e0418618e62fb2b0ae1f0442b3c36867f9fc4560f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.6-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 80dc32fd12a68ad2c7cadbc563261225e272238d8ebe988aaaf63bef8ff81b49
MD5 ea1f44338eba15243013331278db973e
BLAKE2b-256 262f23ddfa13bd2ed29421bc50817818001cb3651d65ebd715c5c18380fc664c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 3.5 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.6-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 962e95b1f94c4ed5944d4700034ee390c62337ae1979d056a270f9781ba72df3
MD5 534b4cf4feba325b9bce67d88b1547b6
BLAKE2b-256 c21797843b6112cd40cfb2d8cd782352478390a438de7c0e876d891f93579cd5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 3.5 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.6-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 561bb45ea53a6269bf6bd44669156903815f018b124a2e53e1acc1f5681078e1
MD5 22f33e4e2d3cb5a92a99b1610d8abe81
BLAKE2b-256 7eeb764517915fa5d2e64e6fcc81774c50c44c78ceabf96f7782fd3979db6054

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.6-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 ebc56d3e9723615a046cf2cc707f152c18d8bf9ceb83c721d5edc5fe1c774853
MD5 d7f24fc48331a9c4c9147e40d1b05208
BLAKE2b-256 77f48ba47fea4e8e0f195ddc937fff534739e63eb91def04197ebaa4105ed2e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 3.5 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.6-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 1c97d946b94d9bba9d6f54997ff8314aaf2f190bcb5ade0b549b795f15dc621b
MD5 58fcd9035229f43a85c58cf4e6d48fbc
BLAKE2b-256 22d662ee596256ed521886423c51faa7d7fe81121da65060e67b314bead32b30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp35-cp35m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.5 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.6-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 cfa6b07980bfd16ba07d7ea19159cc14746324d74b8716fcb5eebf82593c82a7
MD5 4e8d2d1a6e3091f10ae80155c0b8176c
BLAKE2b-256 2d658c5746c5f648244be9c8fad52e1beb68a44c1c3083d53455d9b091df891f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp34-cp34m-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.6-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 fca07302c56a8e6967dabe76e90cf4cda05aacb62e51564f3d8f815ee312aedb
MD5 d11ba111f26a9d7626127b5cf7f9e992
BLAKE2b-256 f6e4b1dc3029ecf1ad5354402164e73e86204e98ed9985d35939e66a391ca78d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp34-cp34m-win32.whl
  • Upload date:
  • Size: 3.5 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.6-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 cf9e5c027eb7945e2dffbe7965a8d4b64886a523f71bb07173399c067fd127d3
MD5 550b43ea79a524819fbcd0dec7906dea
BLAKE2b-256 e4bdeaeacca53609dad8f51bca1feff576d189c3129ad2426a918091a492298d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp34-cp34m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.5 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.6-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 d751df497669c79a39164fde1a2d802195cef6d5090f9ffe3d621df5b36b18eb
MD5 3785afa77646ffb9e6363637bf39e8a9
BLAKE2b-256 94c50f6cbd1d90b15fdecaa1e3d65c3939c51a7c2fbd259363550661db20fcd7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.6-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 417803ffe9bfaf63104ea62f36518335b70c8f35d6d6ba81129c1fc05b433dee
MD5 a58404df1149b5d77866f7772b4ab142
BLAKE2b-256 cd6c48d05e1e0086035571faaf11b1fa8b8cb5780cfb2df111d7d1db27df09b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 3.5 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.6-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 bc0caf3030e2c4d36c2c2bfa8d291e58a3e01bd688358c21ec5a1b78f5672ef4
MD5 7605ae97a0078179fc7ab82fa5e014c4
BLAKE2b-256 84b0853ff17f092e92843b0f8e08c4033f8618f7c0ce8cafb5843536c92fd61e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vpython-7.4.6-cp27-cp27m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.5 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.6-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 c32ffff805529d70d8007af973e7b3b2cac423e8c2ca1189f45c1c10f2379b3c
MD5 352b0db79eb408a31f6b4c665b7749dc
BLAKE2b-256 af7b1269ec9cc887993001596ec5fa173b83b793f06868af50c91fcbb576d884

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