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.

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.

Run example VPython programs: [![Binder](http://mybinder.org/badge.svg)](http://beta.mybinder.org/v2/gh/BruceSherwood/vpython-jupyter/7.1.2?filename=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.1.5.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

vpython-7.1.5-cp36-cp36m-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.6mWindows x86-64

vpython-7.1.5-cp36-cp36m-win32.whl (2.5 MB view details)

Uploaded CPython 3.6mWindows x86

vpython-7.1.5-cp36-cp36m-macosx_10_7_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

vpython-7.1.5-cp35-cp35m-macosx_10_6_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-7.1.5-cp27-cp27m-win_amd64.whl (2.5 MB view details)

Uploaded CPython 2.7mWindows x86-64

vpython-7.1.5-cp27-cp27m-win32.whl (2.5 MB view details)

Uploaded CPython 2.7mWindows x86

vpython-7.1.5-cp27-cp27m-macosx_10_6_x86_64.whl (2.5 MB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vpython-7.1.5.tar.gz
Algorithm Hash digest
SHA256 8dbf2887157cd920df15a410c667e2a28f3cd0b922564d97bc51e2046dd7c16d
MD5 fb3ec7e0ed7f90aef9d2e2791d136730
BLAKE2b-256 0473566fff9209ae8fcf08f758d6a2cae93b16edc7bde771c5a865a880be47bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 33bd96af13636c46a3700962db1e70b4625ef713e232d85a6db5858f1a6dadd7
MD5 298a7f1aba1fff8ed7b3447d3d6deef4
BLAKE2b-256 e74dd54f9b217f47bc59b27d100208f9e01b8a9ecadf4747e56946bc0f0a4740

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 7b25f8275eb820295b07b2475ff13d713aaaa85e3e3507269776deb216a29d09
MD5 22f174c3afde222b48d621b2e4c1a84f
BLAKE2b-256 4fc3f221da76f6e6defc897d41aa1baec47424ae8b6dad871847fd09673969ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 3eb8f6a0daadf0121baa71b1d64e9bb3037907f5357393d2a6eb6c53d086b3f6
MD5 a4b77fd1b4a09df6a5c3d1d5a61bf134
BLAKE2b-256 95f98bbabbace33885a92ce0a9585f668a885513786feafeafd24e4d0998355d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 6b83e61abec9f960dc96f4f967514ecfa4c0ca9b51f4f1a6d258bfc61b254266
MD5 13537aae55912fce0988bd74bb66181e
BLAKE2b-256 6b03591ea5d5c111ca5df3f22dc0a933b28f16aa3919375f5f32b06be6c19ae3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 7371a442f1db0c7a6753979825d068c1b20085cbc5f1484e21af43f42a6c7ff5
MD5 9bd39e23bf2ea80b0eb87dcab7da65a7
BLAKE2b-256 39f4acf9e03ecdf69f2e0bf4a3c22979455445a78557af3fb0e5a0a74157b543

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 f61851989cceaeb0ba624310968e90608d4a50123714a0e8c7ad7d11bb41d373
MD5 6061ee04140e35a41f372b677903a976
BLAKE2b-256 a3e6d7a1aa57e478fa6d15bc89c77b49bfe47185a98761f7e609a773d17cc066

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 ffa3e4f35fece9260a334dc2999118f2cfc00641988d674c3f70b39a6913ad49
MD5 8fc1686db67daac6c3411d0fdb35c8e0
BLAKE2b-256 b1466d9af25b4b2576ea698510f60c99ede3e1e40d06012215d03f711a96a1d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 258aaa1acc77c399322df4bb668c6e3566d617532e2d50d9bbe1b0c9963e56d6
MD5 434118465e86f939df5c63c964262157
BLAKE2b-256 2673316b4c52cb799d45d8f8790ef9c6a46f823778557f5332ebf6ef5ae4e81d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 59a70389a0ecec10e77308f7d67ec6455844c0c3cf73d16ac4580eec6b56d64d
MD5 62166ce48518b0810966da10bce091be
BLAKE2b-256 1b8b81d004f37e0bae16c3eaa4c07ee7dc32598cab587dc70eefb236384d2acc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 2df6742b7e8f7d453d60079f697f960b7075ea231331751b9a1f7a5027868eb6
MD5 ea6286baca560515bb616825d2822919
BLAKE2b-256 d3f64c92bd1c7a2a08c382c7081581e8c72ee2bdc132e1150288f01f6be90ad3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 9e954e2ddcd81771684a488fb77bac26d66721e92fc0f01068008573400ce12f
MD5 8d2826845eeba6ff8aeb88c29108e144
BLAKE2b-256 5bf3440b3aef27d8b8a142b1d64024d4b78a3ed3f457b0153a4efe19556bd8f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.5-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 bf6b2364bfac56ac4337b88c6031c99593ee672968fc3215c4bb373f57321ae6
MD5 b12ba9458834884792d2aec5790a7396
BLAKE2b-256 fd10a6c4bc0d5a4a3653eb7adce2aefa6126dd4d000a85d445d9bfa264864cb0

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