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.0.3?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.1.0

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.7+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.1.0-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.1.0.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.1.0.tar.gz
Algorithm Hash digest
SHA256 87e0943e6b8da2abbba2b449c40b50ad95459321822247415d70a6edf1724b0b
MD5 2a8f30b11d8f95d9e1c4bb76dc5109aa
BLAKE2b-256 d637a192cb7d3bdadb350e106f0304601a3b19d7bd14a566822a21341e3d483f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 b8b01e9b71f22bdf400c64dbc080b874759008eaff2659ff7cb7d317bed2b009
MD5 a4bccd4aea2048dc563aa853b08f971e
BLAKE2b-256 a8e845d573c51fa8548dd242c36833bb20b3c42bec0ecd210616cc5132f7e46a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 09362d1e83d961bb7b765316eafab924c19b6438b0fcae32dbf8d9737ef38e07
MD5 6c96ad7f0669d93e356128a94e3e260f
BLAKE2b-256 6ff4b4706de772495182cba53bb78d5d50161eca850cef3d4380164343ae334a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 542f61d91b3fc5df830ec9d86f4218c0dcc8cbeaa8a21cccb8c023d0e06d061c
MD5 a55f43edab0deb20a59aec1f4d42b196
BLAKE2b-256 7f92a365e9f8da795226b0a95d46fd260e1fc81fd761c7151f6f51ad92d718d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3fa14542010f8490e9308efdc125046d36a17a98e52c4f4a4c4d54ece466cdbe
MD5 1fc2d169c432fbb455516712546f25f5
BLAKE2b-256 f27d840c76808833a3b6bc2623cffa6cb333573a2f1ccb849fb4ff868df8e870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 9f6e58e5893e093d55d8126b2c8fcc991e8726f511d463346104cc65c1d9b865
MD5 32e1ec9ecede5007ad8e9f5673f9c91b
BLAKE2b-256 e076d46fbe54cadb5ec8428bb7d872f9f7f11adfc25d291daea50e38e51a4a0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 fc52e2cd95ca30e3b68a04193b39045a0617c9400baaac5c77c49abe174e8c81
MD5 3f20fbba282fbacb99aebcff8964b57b
BLAKE2b-256 4850dcd8769cdd1074c756ea4fbfbf0463312a11f158a383121b5bafb49253d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 b083536a402b3c26065701b872c95ce1db36202111c44953a4610c93e65f81a3
MD5 825f9026cdeee9812e08e28f72543ea0
BLAKE2b-256 41e63de68c490f20a652b25bb4234a587fa4a7790bdd8d965e5bf92dea71f0f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 61fb3001af04071e1cf406685ebb719c8c0ef5cd91b30ad635e7c0e66bf720c2
MD5 eed933eadc45f6140f2b82b67da0db30
BLAKE2b-256 76b71691df0ccf21fdd69472d0e7da619e679a8126e1a02e9084912507833781

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 22653b208d8c5c091cedac97b3b6320b49b33797020bbd8d6ab36ebf62925596
MD5 d55b2f7e4981518a8fd6d502cc0cd917
BLAKE2b-256 578c0fc05276c761ad27983732c12ae78977071688726ede48bf8de02ac2f4cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 ffdb368c7b5cd1d998f9b10d3ffae328146186309f82df043710c791740d2086
MD5 10c84e1e5b08dcc475b75d8be40bb4c5
BLAKE2b-256 8646d51a7ce644fefe52954b2d5ed314afb17d5833eb52a55fa574811e621868

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 8875c54f7f8f4e2bac09320b4b8a85ecb1327dcf2ea18562653a8de264278248
MD5 a39ac3b47129dd01a06eb7d3f059d7fb
BLAKE2b-256 2a6a49f71485174bd6da96dae2c811e240007499cdd921e97a5cc438ca8470a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.0-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 5bc27b29419a7eadcb3db2758c1ede499f1ff100e4891c98f029ceacd39c2bee
MD5 2c331c46d4c7cb2d65cde05decaa6687
BLAKE2b-256 d46ebb1ab0b4c341d38cdf8a8dfab79369bce7c37863df3477335e9e7fa2af07

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