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

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.6+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.1.4-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.4.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.1.4.tar.gz
Algorithm Hash digest
SHA256 1f0aec597e3c32f8c673e26536025932b8ebfb788c1fbd40ba88fa9e5cae19e4
MD5 2f8a0d2b9fde87690db1a10f72f3dd7a
BLAKE2b-256 0c31183ab70d1171ff88ed9fd12402a790d226b6cf5bab88ab68452d61096e9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f79c0e86488504467679ceb19f7b9bbce4ef6d5e10ce979f5104ca8f7345a950
MD5 8eb5c3931647cc33fff369ef368fcaf3
BLAKE2b-256 1b1726ed14e2ab77ac2c0917247ed12bd82b393349e5dad0aa80c4d9a8f998b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 b024f3ad8588f38d9603c9bffad76c2472081f33e3fa9ba75771ece82362d03b
MD5 f3f3d9f72df0f6caf342ed1f9a83540c
BLAKE2b-256 4e9063b0258e7d35fb084489d154bfc4e53ee5ae8d83623bfbfb10d95259464a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b7eaad12121ffc4308eb9e314a086a07347a47e41dfe28fba015c07c35911077
MD5 165ebaf333ccea78993ea8015e72d612
BLAKE2b-256 066284c3236afe0c18b503af72a90fd5ecd7b2999e7c68978150684321bcf628

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 4d218198eaa7ca464ab0a40a3b54474fc448816d1df9f48bd8a31cd1322dc2ad
MD5 16c408c70fc30a4c1e58385ea2dcd4e4
BLAKE2b-256 b045abb06a7931c9a104c515a430a3d0ceca4ed6952f5cd0afaaaaf4c11ffa3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 b35cd39dcfddf2575623e4b6bf70e0ae7389b110f5a1a870b66fde6b3e71b14c
MD5 cc6961a6aac8852b7d8a7e06219eaf6f
BLAKE2b-256 b8b98c56739fd116bf08a5c520c9fbb0391535b50a7b2637e0c17f04aff07f04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 b2349955ca79a5080baeaebc6c9240764ca27bc61e1476184d2bcd3a5a4fecfc
MD5 f22966ed9ccaad142a876ce01a716dc9
BLAKE2b-256 fdbaa86274825715e070d22545c99761ac732d7cb0d8595e85bf73f6bdb82c64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 ae1f3d25de7af67845665cd174ef0e6a0c7b3b2069ab9387657f55acac84909d
MD5 8b3cb39322fe021ab0d30bad4527f90a
BLAKE2b-256 dd50cadd23eeb509a6fac22b82933f5f9b46080fc95b9a299200c191b8f69aff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 11db259a94f7370bb9858a71a62693676da8bf7e73e8d5bf53de826a487458c7
MD5 832ad2c00973f813b6ffb28b86814975
BLAKE2b-256 5b27fc2139b49292215c436e3f5a91c178b2c534abeb1400287a5b7048c2c684

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 2e64b2f18e5a4ee0bb2cca88bed75a129e124045b3729c0ae60e66d9628fceb1
MD5 5b1504ee9ac17192e3dfa7d40700f58c
BLAKE2b-256 00fe97368d60cfffc15cc3647bb42d7a248d4848dcfbcd3e1a79bbd4e47f8179

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 38d18495f1fd5c045124571ff59e81709d5ad5cf6d3666465aec3cd4989923cc
MD5 fdd417a6d2ab7eba5dec459d090a9e6b
BLAKE2b-256 ae1c7b8cbf15d76397f1703f202e33635331fd471317d2485f927cbbdbcc329c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 efd0e69362caab5c040f55fb185b5af1900052180176ad164de75bfab1ace117
MD5 c0e8dcbefeecfb30434f2ce8fa003e88
BLAKE2b-256 e771b3365f3664c26aebbf5dfde02afc6a6add655b85487d0e1bcb5975a49f50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.4-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 21c4cc4556e80219a6a80b01845ed079ea121855a947840bb36f15f3dbe4aa62
MD5 9fbb16759e88956b689f51431237523b
BLAKE2b-256 e945cec681e2cf623bd4b7fd9c92f9cfba8952522d6e70152b7637f3f1fa9eae

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