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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.6+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

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

File metadata

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

File hashes

Hashes for vpython-7.3.2.tar.gz
Algorithm Hash digest
SHA256 736eb2961227f27dc94662b36fa800b0bb362f67f9817250a564316b6933c067
MD5 8d9d809e2e95dfbb3c35c50098ca9ba4
BLAKE2b-256 615494cc1714ada79710b132e7ed164bf2720a15a4e5ce24eff284b717c933d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 7a78874e5ccc021d0874f4c0a29335b42f7c895c6719c1ea8aa9e63b582fe715
MD5 a4ba40d9018d9da5ed0f77afd21c0320
BLAKE2b-256 b7c45e20ad316417c094ab8e12f804cca742b52c400a379cf510a81351fa81c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 968d1c984a9ad65279dcf8c535b134091951864ef1b6c71d579f8407593a30d8
MD5 9c58ad7f746e6548c89d2e0f27014e3a
BLAKE2b-256 5b2f9a80ceb0a5768c9ed16cd4a1daf6a3a2bfd3e4663378a8136ba59e15c699

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 ce47bf0533a8fd26e2a87bdee670f30d77211f8a9a6a2f4f336086b4509e495f
MD5 6bfbd1442babe1d9aa2eee2e8a438c6f
BLAKE2b-256 77cada62e31754b61b7a2dda048067bb5c611f3a258ffbfe061a0a7f4d51d856

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 d2662712ffea7dd887e18cdd61d9b863172ced406530b629052e90fc6dab20eb
MD5 d2d2c77e81235d79e43a249c36725e30
BLAKE2b-256 2512149a84a10f92b7e4ce8be79e058506ec0643eb7f621b94cf69fb53a9ca8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 c32484b88bfa7ff91345ff9b57430a1768b456f33e232b5e77270625a98aa776
MD5 8a5f3cb58fe81fec91d42a093da2ac15
BLAKE2b-256 cb4c05d662246ff738988b861001b6309527d5aa93b76ffd2c6a48b52f1d0bbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 1df0f86315298ba559798c432f5d9c53991f1f2d8d523ce0f883e3b0173518bf
MD5 e4bbc558c1c7257e764fa06059d53d32
BLAKE2b-256 5dedecaf1795f5868e212c9826b4e656a590e9add08c08b04ef7e451d13faa28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 8846e5a3ffc24c4979d302c142efb44706c52e2ea2f0a02d5b2a97aadac7fd9c
MD5 832dff10c8ee779300f649ac33c4aca3
BLAKE2b-256 5ae6be718f0afc2caf86e8ba3b080ab3560361867d7576c8ef00d635f4d17a19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 04cef8c79251549f137dc4e29abd5afb77215a2aa0bc55cf2e7446258f83c726
MD5 ce51756a7dce2804f475709e5751c753
BLAKE2b-256 48fcee6132472a5a62a7f9ce2db44c2e1d2b6f3d8f6517d6519e9de04976fa88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 41c23d668eab8b3c72f6c08a055161e2c4e127b3d9ed812f3045070e25bd5a1e
MD5 ca1fc08bbae55142d1c571d3fc12a30f
BLAKE2b-256 6bc35256861b41d254c2e86df40d66c1bc340d5b510cd94952f8610cea2b29b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 b3af2e2eaecd2d45e8c2e6fab1a1679a93038790cee42828793dd4e8715b8efc
MD5 809a9319c09ec5c8c80414a54be1e28b
BLAKE2b-256 58647d608966b41cd8ef5c0c2e27bbc9de24211db87e1c7ca07226cd8ed05ce6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 964a1ea216c947c99ae7955aea75ae6182ac90bf8fafb8eab7a6ba99079d926b
MD5 6b68d33b2fc761b1795b7150b21df77e
BLAKE2b-256 18ee5c3179f230eec54bcc3dfa3333dfc2359b9ff942a481c061571ff5a61e62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.3.2-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 5aa25666d1f869fa60335480039fd9cd7f0ce987a65ebbb3e7e505f358437fd3
MD5 4f6629697586b17397aae5c260de8e76
BLAKE2b-256 b12d3d69d4276d23323fe0eb90da4ad5de802d086e121d8d2b572bf00ae500d6

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