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

This version

7.4.7

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

Uploaded Source

Built Distributions

vpython-7.4.7-cp36-cp36m-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

vpython-7.4.7-cp36-cp36m-win32.whl (3.6 MB view details)

Uploaded CPython 3.6m Windows x86

vpython-7.4.7-cp36-cp36m-macosx_10_7_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

vpython-7.4.7-cp35-cp35m-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.5m Windows x86-64

vpython-7.4.7-cp35-cp35m-win32.whl (3.6 MB view details)

Uploaded CPython 3.5m Windows x86

vpython-7.4.7-cp35-cp35m-macosx_10_6_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.5m macOS 10.6+ x86-64

vpython-7.4.7-cp34-cp34m-win_amd64.whl (3.6 MB view details)

Uploaded CPython 3.4m Windows x86-64

vpython-7.4.7-cp34-cp34m-win32.whl (3.6 MB view details)

Uploaded CPython 3.4m Windows x86

vpython-7.4.7-cp34-cp34m-macosx_10_6_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.4m macOS 10.6+ x86-64

vpython-7.4.7-cp27-cp27m-win_amd64.whl (3.6 MB view details)

Uploaded CPython 2.7m Windows x86-64

vpython-7.4.7-cp27-cp27m-win32.whl (3.6 MB view details)

Uploaded CPython 2.7m Windows x86

vpython-7.4.7-cp27-cp27m-macosx_10_6_x86_64.whl (3.6 MB view details)

Uploaded CPython 2.7m macOS 10.6+ x86-64

File details

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

File metadata

  • Download URL: vpython-7.4.7.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for vpython-7.4.7.tar.gz
Algorithm Hash digest
SHA256 49fbd6f970547ed904015bcb78cd0210b21dacda4cc8e2c621eaa1285b989edd
MD5 9e368c8d7c3b8a4ab50de319050ac455
BLAKE2b-256 72287b27b5db497a2dc78039644a2428a45f2cbbb4a72376aacbbd6b2d9f540b

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for vpython-7.4.7-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 8395708c6da833dc2b492d81a5b5c0b1367c3f394540e5a6701be6967ff88412
MD5 01bf21d97b458e75caf886cb1b2a1252
BLAKE2b-256 910b27ddee8783f64c3fbcdbcaf2ba24cb9105708ced80933fea336a8b078e8f

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for vpython-7.4.7-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 9f17c403a8390902252d4c456db2615bf2b4aa1fe5f4abfe011edc2cb85fac9b
MD5 ddf8d54fa8910c9dd441eab71c6317bf
BLAKE2b-256 0d2d9c61f9995d16ab0d83eac502318eeba79866ed10c2b2e9843e0e9d4b48fe

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: vpython-7.4.7-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 3.6 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.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for vpython-7.4.7-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 dbf1b2771ff4b488c1926a32c25d92235a38c795a5cf6570acf43940b303bb7f
MD5 e429ce6badb6816cf79ebc7e51cac49d
BLAKE2b-256 ed421d031ce707770510a62cd180cd23be20b747ebd479e5ee26df71dda2da17

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for vpython-7.4.7-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 1e20097ad977f813e2e3a366db9d18ccbd94de1ae8f0f5a5bae40e33e67e72d8
MD5 4dd6067335e8433a1eb3fab7be237f5b
BLAKE2b-256 afb2760a03d4733cb1f653433af47e5199bb7bd5ee9656d8cde9e3f4c0f79468

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for vpython-7.4.7-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 faaa27844289b3cf3ca2bcaaf35ebbbab9c3d302146094cd8768e590ec60be85
MD5 3288f3104031c9698bbd0468cbf6ef58
BLAKE2b-256 026cef7e388a1d6abf0673267fffb39f4e36bc28eff8f85e0d8c0fee2ca34bac

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: vpython-7.4.7-cp35-cp35m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.6 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.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for vpython-7.4.7-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 8cc1bc05fb9b09b71cabc42e66b1b9df778bf8fa5797e792ff995b3033f13762
MD5 6267e77f3c34490af62bcd776e296b85
BLAKE2b-256 321566dfadfcd6ff1a1790bc25d33391c5e3534f4150d5f488fbe6d192b5bad2

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for vpython-7.4.7-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 eedaa617226ee1d5f1fb06b4c350cd85d5d68e4b6c1951dfb0fc051213d88922
MD5 c4d9cbb0a5076eeee0ad7a4beaa62333
BLAKE2b-256 284e3b69e2889c8ae76cd8d7085d86be46b754836477cc276c0bb051fab20d1d

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for vpython-7.4.7-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 ec0fcc031d2ff14cac42e405541581b10443afed950aa776438d3636071aba5c
MD5 1aa62c62c852491b05136d516b2663d8
BLAKE2b-256 e49e9796e6c068cbcaea344aebe0fe5aa7245e60e90695b76d42d7fe49145405

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: vpython-7.4.7-cp34-cp34m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.6 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.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for vpython-7.4.7-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 24751c4bfd545cdf6b115936ccfc9ae892441ce8847843cfa430335c49418c6f
MD5 feefe591d74cea545f1d9746f238c05a
BLAKE2b-256 7ab2d0afb629a0ca608b8f85e6993a4565b4f7130c144b0320525428b56579da

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: vpython-7.4.7-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for vpython-7.4.7-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 4e2bed5f651f0b1ae4c25f8fe158d3a6a9b01df7ad613ac6ca975dc5e73374e0
MD5 8443548b7f74fd3534002f42f6252c93
BLAKE2b-256 44ff16869dafffa971067751e622abdceb6bc874ad1377724a9c3298cf00355e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: vpython-7.4.7-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for vpython-7.4.7-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 ffa465172ed349444ea121449b6a97100c514822e1f9424d5984452940122528
MD5 3433fc42cb345e2ebbf2467d94a08381
BLAKE2b-256 116ade0491109dea1bc21715ffc6e793710f9a8e7211f029ce12a9b19928441a

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: vpython-7.4.7-cp27-cp27m-macosx_10_6_x86_64.whl
  • Upload date:
  • Size: 3.6 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.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for vpython-7.4.7-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 f362132e06470a23f570a68c916b037f0de29ddd199815fae8a06ff7edd69018
MD5 0abf60c0b430835ee4954b5e9a13cfe0
BLAKE2b-256 ee6126ee6e1f31aba39d66c46286bc4ec85c1a487ca4937ffe8914b6e84ae884

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page