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://mybinder.org/repo/BruceSherwood/vpython-jupyter)

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

vpython-7.0.3-cp35-cp35m-macosx_10_7_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.5mmacOS 10.7+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.0.3-cp27-cp27m-macosx_10_7_x86_64.whl (2.5 MB view details)

Uploaded CPython 2.7mmacOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vpython-7.0.3.tar.gz
Algorithm Hash digest
SHA256 6de274214e47f195c837fe09d853d73b189fa38cf85d0b2b25dea6c25efa554b
MD5 003ac14ddebfa6729d3816e96a57ce87
BLAKE2b-256 9997c7a7d8aec3e46755cd6f936c1e98a44829361b0e7fe52bd01672e0340f27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 825ac46b83071479e35f3b1cd909564bc2390d4b7d4c6cb88b015f1e60f1b87a
MD5 a259b9a6329244b118545f90adf99542
BLAKE2b-256 c82f42a36c5940a995e4fbb8c425de570aba5c6e7561dd4d644f11104b8e827e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 6f9db718d132f9045137b3c70727c7ed403a92185cd5776973011cea21f2bd45
MD5 c4f839148d6dbd0c30774833f76b7170
BLAKE2b-256 8d9f7524ec149b6900c84d73d29d174421fab2839b61bfa1cca0ec1989320fed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 9c4e923e15367b62efbf8dff1c471113a56983a0741b84590e97011676ab5d7c
MD5 68594228ade146b7d4bbeca24ecafe86
BLAKE2b-256 a6fa89e06f06384da94d10755e834d8535e841a1389701fa8f55f700a31ee420

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 8a884c6a910eb93bff2e605e746d04869d372a2227b91a117b0381452d5ad069
MD5 0711fff4f58bb736056effea3d8632b2
BLAKE2b-256 2d54c0069ebe5903a185258147f8e2c92fb017866754f3daecfded16c3bb5fc0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 4b460fd7dc7cf67ea5bf2f524c6b3cd6bb5865f49ec92543b8f3283d390aa5ac
MD5 68ffa506d4b8deae08938722df7d8aac
BLAKE2b-256 71dd99ef221454d608cfd1d520de9701b306c5b26d15f79e6d901adfce644230

See more details on using hashes here.

File details

Details for the file vpython-7.0.3-cp35-cp35m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vpython-7.0.3-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 71e9d918a42fdcc1068e3f3c50da254fd4e2b4af1198c28e4a65de286bab158a
MD5 1ed3a24280ec4d3407f166d15ba1388e
BLAKE2b-256 add72f7d9c318fd6eeb8d5132bdfcc7429cea4ebaf6300fe5f8ca3c9968d8c02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 7057c06787e504d4b54336babd86bd102f3408db037c1f4d14f45b2c05afe064
MD5 6087231a3bdf274e64838f9c140bc9bc
BLAKE2b-256 d628cf37b65cb17dbb692168c58d2f256383097a1983b7b0b178254f7903f9b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 29e0202855826e65c1648b5d8ede29c2bd4aaac4e8590833ed763ef2a8ab3358
MD5 e824cd24f7a0ddeecc130a56e801d1b2
BLAKE2b-256 11e28e60a561ba4fb1719ca09ecc5310b39c3d35627c7993c704b182aa1634ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 d625eb06e741ab7e10d59f379a908955027393638f0286dd3f722c5025402418
MD5 8c83b8e54b39696c49d7f2ec2f0d5a6f
BLAKE2b-256 5d551274da6d19229945c83dd40500707ee802a351028869a1206d906dc8c2f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 7c34c5a478e8d402a33cae3250751dfcf3de961b9f65d3ddd61d9cb4fe4fe56c
MD5 8a4e7c987cb98d61b13f8b4f2060048e
BLAKE2b-256 79236c46cd2de2a6ec72b2df956f0964b86d3c5255ef5ce5e1ee27af37f7fc60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.3-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 3470fb9ad5a5c8207e01315d7b490b8d7fd46e238a0a0a9bf952edc0f6598c75
MD5 6e31317de27a2fb564f7ee25d615366f
BLAKE2b-256 55d933e64c5672db0663938b9405ad0519c2c430b087cbfba66327125779218f

See more details on using hashes here.

File details

Details for the file vpython-7.0.3-cp27-cp27m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for vpython-7.0.3-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b8af15d9b867ba38efe78f28168cb50f41df5c1813974f808ddf5bccbb67b671
MD5 6c43fa749c8247f2dff319791c3c0058
BLAKE2b-256 81284347b999397676deedcb330e9c2ee3662c22808b4a5c7f8ad3c3cf8b9f78

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