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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.7+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.0.2-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.2.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.0.2.tar.gz
Algorithm Hash digest
SHA256 df9283dfa72cdb6d84b39e343bdbda68c1466355c9e0e6ab6986c7e6426d3e64
MD5 8a71c7a12c23627131023c43f3723ebc
BLAKE2b-256 b99bc3c76f26786c30a815f642b5c8d5039b0be033f21a07d6a23d300fbd9afc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2c4d653a15191fad61d2bbb2753ffe217e017ccc4b3062328578ade39aab0497
MD5 a12f2346711eed608fc809843154bf02
BLAKE2b-256 49e9ab84e88c960ebaa4ea973e526aea823b6b580ed113045d949e622fd4acd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 d2252463d0d23a8fa698d6f3f94eaa3e1b1464f439394591111b63e2e4bb30db
MD5 19252354646889522979db21c5b2ea2f
BLAKE2b-256 f4fe6b2767b8fb9fdf0723187f2f657c8b91d3bc0a8f9e65283f23b0f5b6e884

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f092cb3c1c5993bebdcd0a8152750e24c76c78a3d78c024a4f595e36a5b61295
MD5 218c63571fa0c4ea4d42f8451be1bbbe
BLAKE2b-256 61a25d3c3f88507c76eee938f6f0d74ad55281fa0bc5c0f717e6860f923858cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 9668a72f7cb69bc9fbdf83f1f2e020aed1e6d546e67a0cd89a8fd209c4d9818b
MD5 dc68bd276a256436aa8a07f7c59f5f09
BLAKE2b-256 63099de581b5337febbd57e7bb7dae37b874cea7cd9e5fabdbd83be6978a8e16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 592a80f4f9c21403b2647dc379a6ec496d7267ef3649163e499eb7f63eef1f60
MD5 68b0a37a6c76354029f1146eeb3b2f79
BLAKE2b-256 3b51dd4e090a3f449296c65c6d9af5a2867ff46315fcdb66ea5445d2ebbfe470

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e8ac3a66b7ff8383c2c0a9adff1a2b9a87f6d2ac40c1f77c96b93662143254f7
MD5 4c6db40a7a5d06228f51005a9334450a
BLAKE2b-256 ede4aa5f109fec60fdeb41f9fd5b98251d2df918d8a1b99a6080f7ba222cbc5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 6aa987b1733689820608edc85f324ba8dacd72e081d344d3abe685002fb4fe31
MD5 b37212f84afebd60c464ceb3bcd3f835
BLAKE2b-256 84a1b3cf4c28487c62e3eeb2d97b31ecb0240bf7db34eb6194c9484356c4e9ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 2cbf92153e809de375adf6afd71146b1d5b3ea96242e621bf6ff32c6e8f0d40c
MD5 97a4bded7fb0742f58c72181450d1f76
BLAKE2b-256 460a4efad2e53495b1b34b985d1b1322f968e20dfcfcde42f50fc1d6b4a7f520

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 53de3f7aa04d8ee78115a6285a199a2cf10aae9a63807a60d4a1e8288069fb7e
MD5 108bec69242b4e6fa330311977c58c23
BLAKE2b-256 44500cab88f250b29f76c3d2d8650d7caefd7546b63bcc63c4321a38ed12c73a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 6ccceb147fbe65d7b5d5b25f4f829bc69b243d6a50a89ed5cbaa56c79de5e235
MD5 dbc5e782b216e0ea53f51f707eb45ef8
BLAKE2b-256 fca636a9b4dccc1dcacc9a6f28363eced82a4166c79d1618ef97d4e7dc3b5d4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 465be5a0e8c96dd73191be6df1edabf1517bf31a7e9ec8f14017d4fe958343b1
MD5 acc16686c489e5a669e2a3e1016e7621
BLAKE2b-256 cfc5fddfa223dcc7cd7e5fb2c4f3574aad35277214b6ebca848257a0f9a55455

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.0.2-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 85d3e4fed43cf7349551df8d0b5e254f3ad615a805a0117afaabe060ea747608
MD5 abb7aa84e8bc62bf9f46f8afafaa7241
BLAKE2b-256 064a96544268f7ef94cdf16df3109bd5d559d612a2dadf52636dbf204f55f2a6

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