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

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.7+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.1.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.1.2.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.1.2.tar.gz
Algorithm Hash digest
SHA256 96a020d4f1d8c7bd5b57c10c76483ce713c8570c199ec59063595aa3333f509f
MD5 0e03e0096757bb3924aa103ffec7afaf
BLAKE2b-256 1c33301897161ed3a50a232d657f4ca461bbfb0815084cdb24c7268f27923df5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 eb84f92df75bce89848cc8ab053f2f4b9f376cbd102dbfeaa3c809539a9e3bf3
MD5 bfcce091f29500b470ff01c82fba7f8e
BLAKE2b-256 84c2697129bdc35181b048b7fa145ce5c30247dd68bcae0875eb6373dcc53832

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 8656703cfb2904833df38f4f858bc4cbc32792df3db5ba14a8ca7dbbfa2741ba
MD5 10f7bf610a451f0b00511a5d00867a35
BLAKE2b-256 c3c1cb999ad24c63c72ca3b769f6d865acbe44124d9d4460e6b88fdf87ccbb76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 2a703c5fbce31e7d4ef17b4147627686b63ad114c4032b2b5c9aa02863d46cae
MD5 94d7c4dac22795bc9aedd1a24ec7f62a
BLAKE2b-256 c3fcb3d9159fc7d2cc65caaaac4fb508382fe058f6f45fdc2553c92e720316a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 27cd5118aa58ec218750c3ffd53217a9f95e54ac7ad6f5f0e4426b589691e4f4
MD5 09dfdf434906d6969573591419928c6d
BLAKE2b-256 bedfe9d4cb38c9d1688393ca422f446fbf14b8463fb0e2c2646d23e1709b76a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 99b7c82e0b6f3505c05b65e17fae5dfddbd86639984f186bb1dee3acf0307d3b
MD5 38c7600a95dacd5026bfeedece9dffd0
BLAKE2b-256 2b5408afd04ebddeaeceece8c3a36396e3dbed2b3678643c5fdc6403560331f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 2765c556f52676f00509599d1d48ef8f8bf9613cf4861613706e613d63796998
MD5 0ff3cf37975909f6fc8238b83f78226c
BLAKE2b-256 5b26fd949e1068c4889e4a87e7bd9a82ce070ba25b78b1b046ff9396a24d4030

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 6456e86086a376c9276c880757b5a41107336b8ad608d2c1826f9c75edd47721
MD5 b2e9a52aee652b5a41a9f90e98f1d570
BLAKE2b-256 6bc5fbe7d8f3b7eb7fad9d8d0c4f7cc0ad750958e7956c09efa46dc7ebbe14c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 04a3820b4e95668a8e3bba90a39361486d543fa6cb906bd197cbf23772b5222d
MD5 4f169342d70583b855984933f71e0316
BLAKE2b-256 62e57bbbaf6bf4443f11461114b45e05ef8d8cd925e6f11252f561a9fd7c0abb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 29dfe148fcf1e68f3c96960863fc4b96b156c2e8445be1dd0fe528f4ec0f2681
MD5 6050a37e93876fbc5b7ade4e22e89fff
BLAKE2b-256 e9c2dd63bce482dbc467f730b5712e9bef562695baedb6ee2984e42d806f02cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 6da01db8d46d0f31df3dcd81e59378f13d083b1137b1b30aaf7b0bfd55d40003
MD5 00661fc6a704a32d9290335614a84895
BLAKE2b-256 acd715edc72401caeabe20ca33dc4d89bb12b73778208612c0e7151fa19013fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 0f69f330ec21185a406ca8156235104fa0157f347a0fb2662fdb12933d73cc6a
MD5 ce9c5b128d167929918049610f8d386a
BLAKE2b-256 4bc0a8a1a995dcf173fae81c57f755036203d91b23a9460aed7c23695502d8fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.2-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 02abc42b3982687e3a529e962d8949c800aec8df2ad34bd826b3bfeaadf471ad
MD5 abb6c1618735fbae18d3a10e83c2ced1
BLAKE2b-256 0ed27cb503327bdde041d0f28de6805854ca50d7f34f91d62000c9bcdfb07800

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