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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.6+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.1.6-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.6.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.1.6.tar.gz
Algorithm Hash digest
SHA256 420a682379d978ba8cce276428f54c39e79fc429c3951d062eac762546732bf7
MD5 4a770d3d1b3c14c3208196b4da1a011b
BLAKE2b-256 58aa8cbb47ee5b7346a1f231a21a6c1250be2b9cbb1c5d35e3bbdf683fcbab9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 33f82b87bd762ba8116dc83231c7aaeb15e3a9571805782e256dc968d9c81cfa
MD5 289e47089c85b03d83516e8043884439
BLAKE2b-256 dc4953536fa6b7b5a0828f159ec1b4b44b310778284f153e7a3849a9a221de5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 09dba3a5c0839abfd6544b9b18e2ea4b301dc8e30876ac999f3bbbdc46e23a44
MD5 cfedfe0247864bb67039655549ff3535
BLAKE2b-256 7fc5b7462e72519598d2a8db7756671c80c04cf7df331373255c57bb87cd54e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 cb1c2a52737e4d54cc3a601e747f4c092addcb904e186fef2afa0109e49bf565
MD5 55ef9c9262b92fd2bb5e7e14d226fecf
BLAKE2b-256 ea5215e8a5621a5466d77eb7dfe79c46ece56d1fafe9dfb995a9be0d30a04f47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 0ca74fc8ecb379ad4d2bebcc53f73f46f68728795a2a10bd31f80efa7c5f1ed4
MD5 09ae754d2f177fa62f5530efe3c0d505
BLAKE2b-256 221f1b097ce003b8296d72bff7b7bdf31d9d25c75dc9d8c279a7b12de27eba68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 9c0b8f736d25a2af5c55c57e8d754e82cf4a47f8ea698851ac7379804fe6051a
MD5 5f7a1a4a86786957b2d35cb6b2b4a9d6
BLAKE2b-256 f903cbe697ba997d30eccec4a5b79e7d074f8cd67ad2e9a4039a9edafd45a2d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 cada5f46704e81e30a70849b7679a029aa465899eb0dd36b026fb585e2f8f98d
MD5 861809fd3c7ae71e32a0a791baf0357a
BLAKE2b-256 8b6eb03e1ae0271b06476d186449174f1d01082957e64dde31e1af55099d381b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 b41929711e82ec3c63e870aa5fd68188cfbd05665d02f9d5e42818fb70747bfb
MD5 b4b4aadb5c847aee71abdbe594da574f
BLAKE2b-256 5f2bcc911ce77242c52321f00f18a26e83f9aca95d72053834a3a156b6a06977

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 6e45dba0271291260902cfef49d4f7ebfe4e731c1de8c35e2c31baa1d2b03065
MD5 c5babf78070f3bda222badab7ddce550
BLAKE2b-256 03b6854ba0178a865a130c32209aef8e3b8d795a7bcbb1e4fe4660aadf020674

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 457cda2e184f485d30d6f7e84971d72fdeb1db712fce20603ed97ef13e59afa6
MD5 71c3b8653a002528e16e7d88945dfc43
BLAKE2b-256 5ec13fcbc8928c84e8b5b553826445e1d659001ea4141d32cea80a855a45e280

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 d73b7027346129fa211c26ce9f622160bd853e672e6c5d0ba6bd47d6640db9a1
MD5 3a3c77ee22aa1be57db8607f9965713c
BLAKE2b-256 38568ee6377da0afbb820a0c75966e9a7d53fea798f5c19a0e6258aac208970c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 e5c8d7b03327b7f64590fa415777c3de50ca1468f49727e8e334901d2204c388
MD5 81f8b13fff882e0e28eade6a350f653a
BLAKE2b-256 9d6acb034740d0b4c0e86eaf556b2e76fa207b0a067f8840ffc64e37a8a90f2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.6-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 3b3b6d5da7dcebcefbb32b90eb7fac4d58d2fe9f958c4cc1a3551b6587e9733b
MD5 90fa75a7b95d0393917e8da2790c5c26
BLAKE2b-256 5111ea3bb9d5d58a0ccaab28db11de3aa8bc657e3db8368864b3e304cb041486

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