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

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m Windows x86

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

Uploaded CPython 3.6m macOS 10.7+ x86-64

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m macOS 10.6+ x86-64

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m macOS 10.6+ x86-64

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

Uploaded CPython 2.7m Windows x86-64

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

Uploaded CPython 2.7m Windows x86

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

Uploaded CPython 2.7m macOS 10.6+ x86-64

File details

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

File metadata

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

File hashes

Hashes for vpython-7.3.1.tar.gz
Algorithm Hash digest
SHA256 34869741b6c5203f629407f38b2d11b6b757275461f364ff1b01e784ef193116
MD5 25c259ac968922e371ddf17666c3c88e
BLAKE2b-256 a261718a38ac30d1de3291f1c4bd52c49128591beb0c4745f01a93657b660407

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 defb564e36b9dd64d490c5753c99c5f9b19f919c32f2bd00f6f46c22b0bd64c5
MD5 78466763b77628707cc3ff20241fe3fe
BLAKE2b-256 f422c87865e85455f0203ba4c756f31cd51b35408c23d8e0883bf6d0034a992d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 1939425719572f2cad065e66e3a3acfb698d59f962686b74513fea086e966f9c
MD5 d2b26a62a48b0211e2876316a6c5a527
BLAKE2b-256 0b5a6d16d290fe7721f04fb1d531d405eccc244fd97585fd8bf49531fada0930

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a2cff5dc186cda32475a9c00d951b967192d940afaabf9c8dc9c33d62fdde961
MD5 5ebd6b15afb128f937b524635b89504e
BLAKE2b-256 8ac5c41d02a7c929562aa410c03ffe18e075d4c9db0b1107ae7ded65691ed863

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 4b09f7a48c5316b471e679eebb6d277615b254f07fd2ac75567615b2c6055676
MD5 922214eb5757f46f0b7c40d6cf700961
BLAKE2b-256 0c01d2f5c407ed2787290d86eeff0af29cffe660ae2ef715c942be0c02eb277c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 d3123caa919c0fcfe1aa552722402e61ed7b1ad919484d386b7622b4d2324efc
MD5 386bf580caa9e18f620b11894bf0477a
BLAKE2b-256 aa7289aacb95549144f8d7feeb059201280a41e6edc9778475b69520f7f2162b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 455bd347375a1e4f7de8a66b1ad283536015da22954e9f168088de3b8940e832
MD5 be6e38751a2ee303bafd2496e9ab0d45
BLAKE2b-256 3e7b35bf337362b51f21541adac9f8f3788fd5f90af902828fb68268bf38ca55

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 704bfd77eccb9fab8334dde57828977b9403e8c2f5bc13f90a0ab3ba71ed5954
MD5 e425897b4e67200f335a300fd747f221
BLAKE2b-256 37dcc06199a4644dfb2c64068eba7ab7763db1bd86a9abb936ec8fc5c2923f92

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 99289559972dae7616600ddae0ce8b32e3e2b5a7c7fa8693b987446b1b48136d
MD5 24c88d71f70915d44872005f12570ca3
BLAKE2b-256 d9269036c5c0195c022d03b5460af48f01ef27a1283b1038e9d4809287cb7bd5

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 1025fd4dbb774367436795af3a37d40fcb625d17a534feee345c4c405d315e42
MD5 9364963c76891043244f5762cc0b972a
BLAKE2b-256 9f0a5b4437c7888b3d488177c1823ea08592f8e1f0ecd645ec616d1eb070368f

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 c5e7f007be18e47a75e6f04aa13d16b36cb39169de39d97c37078fa09b2e7781
MD5 0e194b882145dee76105121687ddbfde
BLAKE2b-256 852f6f53534fbfc44ac52038dd3c181a79c82036b6e0b1004dfeb1d377553ed4

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 d2448c09165c3ce069d75465743b5d59964dcda001652b802abca44733d47075
MD5 d658d11ad4ca1880048ab8b108b45644
BLAKE2b-256 9e7c3e1d89f1e02c8bd18d51496a1e3b784e28d212a955f45c181082ce9e3d8b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-7.3.1-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 25257775243a6aab628609aeb87a4ccabe86c3d5f8f644e1e3c0845c526af4d6
MD5 ebd0a61579faeef059b81627e44355bb
BLAKE2b-256 ef18844bbe3803fed369d1bf8646073e1437fbca141791063b90a7e0de81bfe7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page