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

This version

7.3.0

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.6+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.3.0-cp27-cp27m-macosx_10_6_x86_64.whl (2.6 MB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vpython-7.3.0.tar.gz
Algorithm Hash digest
SHA256 7086d706bb7be51fe17e8586b49659dd92cfe040d0fd8e5de735cb8bc31d751d
MD5 980bac50ab7e533566caf04968f98ac8
BLAKE2b-256 594b86950302c07f99954e1f70e073eee331338925fc2dfe65a89a871f85e320

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7152e74b38505389bc872e7d688082f5378dda79ecdbbbd3648dc0013b22eae8
MD5 2e1d82b69fc36c430312b898f6ed491b
BLAKE2b-256 4b826a19cc5b975c936047017ea1dfd3048b329d7e3c60a1a3692f7d0b525473

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 08f971a6f896745c4bc276c9b24398dfb8f4d1b002fff02d6e3f53a7ddc01782
MD5 7707e129c43cd7ade6740e0b8cb7d8ef
BLAKE2b-256 10614d6b68a0baf73245d96980ba2b0d72d2209b8c30ad92b34d5ee7263532eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 21cb74bf6f349110514c732c310bbb92f2053f32994fd6bb747b4e0caf8adaf0
MD5 be21fb3311d6d58ad307dd5a89eda261
BLAKE2b-256 2302d4e541328c94a4a5a43f187048b5e18eb62968ee63708a7da66b57734e48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 a11d3851ee0cfe1d5e78214279c996d42ae37f2c77314b5f32ecae3e5a3cc729
MD5 f6b2c3d3df6c07c15963de9d49a89058
BLAKE2b-256 bf59cba4313f8d192f8038f2ff555d9b068ace879b5aba403ce59bca410107a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 18d01a005f54c462887178c8483790b7be756afbf51549a8a519ae15197fbb09
MD5 561d40f9b6024c01a5776f4ee138eeed
BLAKE2b-256 ab17b667b5eebefc904321abc41c857ed70b6af3a39be9fd8dcc1a5dfe47f8bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 2647244f127b46c5068f22ac767fb83f19f269712e436408e7c5dbbb27478999
MD5 2dbdb36b629d2e7c310b66064a9e602c
BLAKE2b-256 8ffc6a1f1ea1c218d8bb345fe3b93d55835b58037305f73e1e666cb9376d6ad3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 1cbfa29b4deb1bac9cd281b68a5b95a5c83e489064775dd0db3e86c78766982a
MD5 87c720e898d101d2bb69918b2b16b706
BLAKE2b-256 c282100fd56616cd2a89f50a06ffb8a8672d4da62175352c186f970334a23151

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 88c6cda6e79f5a612a83cb570e9164888be5e1be2e123c6a57c6eeb923d60f23
MD5 fda45a9fe50f7da3a17080ed6dcb7a4f
BLAKE2b-256 7d81907e7c49dcc904df9d2814a71988860d7f8435b9f963fd6b1e899845a80d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 b42e457d4bed84aef6c3f20e4bcee5b4ec1b25c4543a672939d8339e087d86d1
MD5 8590fdfc1c7b802a7c3d6de3d66eddab
BLAKE2b-256 6ca0bdf93573c19226e1d1f5965068a6d68f896a1f4f8e6cce20afcbe8b953a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 742952b9fa7278f539c01435e8138a2b467d5f9f9368d566ce5c14bf25e62c0a
MD5 6628dc49e0aa2c896730c57aaa2dafbd
BLAKE2b-256 8c2a9a814a6e2c2e20ce5c2090bab273d06c05193e45bd9049fd8790f389e808

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 9712c5835e71baced621a7112e638257113949f36496479a2d41be449fe05122
MD5 db358dfd8566e7930602f41232fd91a1
BLAKE2b-256 29be9794b42c55be2cb97293bf300740b7e1d9483e5141d4c7126d1b97d64d30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.0-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 2883231d9174fe5e8b1b2ede9da27657086ac529f0a726521c12b578dc3e1b1a
MD5 a31cb8dcd3a85c08a347e8961c69395b
BLAKE2b-256 8ede4255d08cd44fb022b1d28012416c2cff3f757156696ad65a281ef8389816

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