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

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

Uploaded Source

Built Distributions

vpython-7.4.4-cp36-cp36m-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.6mWindows x86-64

vpython-7.4.4-cp36-cp36m-win32.whl (3.9 MB view details)

Uploaded CPython 3.6mWindows x86

vpython-7.4.4-cp36-cp36m-macosx_10_7_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

vpython-7.4.4-cp35-cp35m-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.5mWindows x86-64

vpython-7.4.4-cp35-cp35m-win32.whl (3.9 MB view details)

Uploaded CPython 3.5mWindows x86

vpython-7.4.4-cp35-cp35m-macosx_10_6_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

vpython-7.4.4-cp34-cp34m-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.4mWindows x86-64

vpython-7.4.4-cp34-cp34m-win32.whl (4.0 MB view details)

Uploaded CPython 3.4mWindows x86

vpython-7.4.4-cp34-cp34m-macosx_10_6_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-7.4.4-cp27-cp27m-win_amd64.whl (4.0 MB view details)

Uploaded CPython 2.7mWindows x86-64

vpython-7.4.4-cp27-cp27m-win32.whl (3.9 MB view details)

Uploaded CPython 2.7mWindows x86

vpython-7.4.4-cp27-cp27m-macosx_10_6_x86_64.whl (4.0 MB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vpython-7.4.4.tar.gz
Algorithm Hash digest
SHA256 136830c4cb7cc0be25e3035e28625737241f6f1e34999276aa90260c5f5c1b43
MD5 61e3ef3c29fbf030482a56f0f2e1a6b7
BLAKE2b-256 dfd03f1737c5d6063fd028c7b3ee6f7e23bc764ad00fe50bb032abc83e8bd62c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 93218bb73fc8d67d11a90aee537abe8fb4061567c4f9fdc714936873e1e4be95
MD5 a88a109a68b261ee7953df4b42c51019
BLAKE2b-256 26dd3ec78e6e1bec81ec21270ad4b0380d8a5ed80399c8ddd71d61d5f921a454

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 8c7fe60a04b5bdf62fe72c874caa8c116bfa83e6b8596776928f4cd9e50b2b6f
MD5 51cc31e3cb36e370c1ed4f91ae34961a
BLAKE2b-256 4a8f6086b51fd8d14fe85f7b6ea21514db7c11ee60ee94d32a1b00b7395cbbd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 c5ace17878825106df0743c7d4ee3b641a6725a505236b844dda1e52b4fe6d2a
MD5 ff781e3c2b182a1f4d2d34e2eec24c40
BLAKE2b-256 6247a3d494e684f8ace20c315c237471d36c9e713d51489dd92d25b947a14745

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 af5a7c991d51fd278bd83dd78014e8bcf45aba7666d641d30e9ce609ad77f5e1
MD5 0aace17f7bbefdea9f82d53adad244bc
BLAKE2b-256 dac84d2839968acb3cab00d620aaee7a7a0595a66005074b2214ebdbc39fb23e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 53dd744312f04416cdbbc05aa65a5eac83afe307399be99f5b6dce5e63bf5b9f
MD5 9660f0b50b3b4704dd793c9059fe4c86
BLAKE2b-256 004dd9820009a1f59563abd128f8e6050ec389f612a7f53a30e6271255be1bab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 6aa508c0794485c1c87648c8c47b5f37dfa2d8a3e334a8da2eca1581ef31b08f
MD5 e781749d889733e30f656af82eb33322
BLAKE2b-256 edd947823b97ff93c250f5dc1f397b4458d371f3a0c4753c8c399cb729b8814d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 50233574932813ba1566695aa30a00ba5e09d6b8ead832dca4fbe83a8638c342
MD5 2eb12bee0e48804ea2f6dbcf3d1edaed
BLAKE2b-256 55543edfdbdd7b8618f4c8f67d083305cddf2f28071c662ddd7fd6920883e8c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 e97127769ea9c1343893e252ec93397ba861267ab035b8fa55522b131e41a203
MD5 1eaed916f5af8d3f37bcb3c36163f002
BLAKE2b-256 457abd8fe9e72773d5e8e4b0bcbac833ad05a3c71dc79082a43a8412514da9a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 ba1d1d518a7ffcffd8f055a664c0b66edd553f6d75d360d9d725804da84b27be
MD5 2120ecd36b4d4d3bddd282857a87196b
BLAKE2b-256 a5d84d97427b9fc61825a4b18ad611e5c7578a4738abdab0bcd6508742e539b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 cf079529befb7a2c7156e30b8c343620ea1ee1f7bd538318af9f7a36360d3bdc
MD5 eca9b9608e73ef065667cf44d0f0cf98
BLAKE2b-256 1ed0dccb564c82ab412379791e541c791a3bd826abfa7b1e96f51dcbee0f3934

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 fd7ffd8638b20cc5e562d8e9210e5289e147ddbaabf3f8d0d0a5a39c535a7cd1
MD5 117b0195c0ea27e32a3ccac2fe362beb
BLAKE2b-256 ca0a5443850b8de45f41ba7595e76c158da2cfb86ce8115a08017f8d5087be5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.4.4-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 769476c4ad2b7b75d0c2c4ca3f96f4c9cb418cd009aad8566d51503df4dbc40a
MD5 37d08fbfa8dc3ea53d1b6c3170ac0804
BLAKE2b-256 aa6c1950d48966949cb3aca6e86ad78dd187ec004fb298da1247465c0c826e2a

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