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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.6+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.2.0-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.2.0.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.2.0.tar.gz
Algorithm Hash digest
SHA256 59ca968d42290684ded826e75c4d1e479a9b2fef7aa4b423a1622897bf307f51
MD5 e62916b298ab59c1aa24c1e5f61b9622
BLAKE2b-256 85ee72f7fd0af710f38bd4a6bf8f488736bfe769d6d4962a152f075cd438f95f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 b155befb27a7fca5fd8c45eeb2a7202118a34342b68c11cc33f2136ea3f94f76
MD5 7caa968dc3aa8ae965c3360716dc9490
BLAKE2b-256 7fe6ed8ce3504530b4281374439fd691d32e80d0fdee0434e56dfa9400bad6a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 5b249eaf991a1c66aea6e074fc9ba0e199d5015b3dc646911bc52eb6b964096f
MD5 4fca7777acc9a1a20d93965004aebdd6
BLAKE2b-256 b3f3f01eeedbe3d80f45cf39382937888deb709f15070deb07248db1b91a3403

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 17625085bea50451f62b2bf839b691a95c82234d8caefbe7ed080e2b49a9726d
MD5 b42410ca21721104e8445ebaa2c728d1
BLAKE2b-256 9e684811775eb31ee6a147cfee6f14409d7068baf795938c3c747575b0c6ce4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 641546bec0b84fe4aa0647c11b270f86e0533d2b2b5f4f27d981310644fd86ab
MD5 408101a55af8907aaef9bae8ccb5930c
BLAKE2b-256 c762664e067c5961ffa2202e1d071d6f3a7813be11f96693283ed3c51871a3ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 ea92aa32d0c8ccc67da126edd355aa89dc279df7de43d068ac6af54d010d9b0d
MD5 def317ce52f243c3cde162f3b3ad9c15
BLAKE2b-256 fcdb7d6f5ff1f970902c8b0b55086fe6d91099efa839bd43e4f0da170d5090f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 fc1295822625485a8b225b87a5930cf7289f2b8c829803b736aa040d9e912472
MD5 be32ead801e36afeda91299c549ab141
BLAKE2b-256 f70eaa4f0c3090fc8e3eed81cc4f9792daeb63fc73f018459b14919c0b1c1ded

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 dbb045d036776bec3f853d1d30be8b3ad6633af2eb62f16381225a45c12812d2
MD5 04b21dfcc20f9e11cbd20776781d2b95
BLAKE2b-256 ead55c7218c5ea96a44ae6e6bb87467596f1c97ff90eac3736666a2d8d1fd015

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 3b9b4bb4c5b5f5824f94b9f12b342fd15414d707353d12349f76ef3358ca3fd8
MD5 5ba2f71b97f50b4b8717309f6ab37160
BLAKE2b-256 ae541e1faee0fbc277c45c5cb5ac787b6f2dfbd9be86c57271af1381a297df05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 8ad4114ecd39348fd31fddfaa444d6b9cb3187a880181b17901653c1c4388695
MD5 c9277cbf7df53265bc34b8f6c75f41b8
BLAKE2b-256 e2530db718b8d18e7b4eb0d7613c0758d9cbca12f6f38529476eb2abf0d38645

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 d91f70de21b23d5f53680d96958cdb6ac9abde81cb77b9509620666b5360462d
MD5 3e4575110f4ba58726a96b00d092bf73
BLAKE2b-256 7804c914ced224e275c3e7f6505afa7089392a6a362ea521d5732f654876f16d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 c29611e1fda9616c5261dd3e71d361d11267196dce5debf899a321b468cf3598
MD5 102278dab5a73917879dda813f15fb5d
BLAKE2b-256 d3d940e1a9c710a544d5a65c78bd866e067ceacf263cfb07da39073cf3e2093f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.2.0-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 a32d09fdc392342109a44a7370ed62b8dd3fd12a9ecf9453b8c2dbf92dc98bf3
MD5 874ce9af205c416b6c8c2ec8b4b5351f
BLAKE2b-256 1466e07588ea8206a9053bb095d1a66c8fd3cc3ddac9d746983df046c3423782

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