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

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.7+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.1.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.1.1.tar.gz
Algorithm Hash digest
SHA256 83c49e1952ca885000592843c36f33fecc09b7ca3d493765ae4491a3b0101d49
MD5 434cbe055efac89593035a6682096f97
BLAKE2b-256 336cff27cbed134b87a987c356bb68687e16a979af0404fa5ae5c8a18fea8a68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 81a924ac2c812f0172e85dd4d32e21768f3f37f710bd53c6f48bdf978a917d82
MD5 f80fb08447cb40206a44c13988ae1be3
BLAKE2b-256 70b61e42909b9d272e2b442cb9d9a92169dad069d3b56acce9ed06125dccb1e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 84a6bec24eda9eea319a7489e62020e8ea90b26d2fc7a2fa60cf4032b6566576
MD5 b65af7ffc73cf8902d55ba297ecbd1e6
BLAKE2b-256 3a9e2e662a3e2f40b043f882441e6f4a3612138d43bd68fd7ab13b2575d0696d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b94238e22a7a6cfedbf5038541199703bf9cb30b1f0196267924178a5df50cb6
MD5 e3e603617c1e6473798217c017687533
BLAKE2b-256 e0f2595e1dbe61e6f4c48e34984b420c384302bcefd81c05e58fd80666587e1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 0dc0ebde11f2592d290fe6b2fd645cce162ad5560794e3ef3f9560fc4938df99
MD5 04c2786cf0b9fb670b874c4b848de83d
BLAKE2b-256 dd297ba28f666e40970af9cead7a22bb074882eabe49568f0db5a12105368714

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 6977cfc43c92d365ec9e1afe7bff44ce9cb9e320ed65a227d7aa68efc3fe577c
MD5 0ddd0842d12e3ca16f5d63f063b8b869
BLAKE2b-256 5aad85bd7df4b36918dfcd1e54f6dd82e8e8a0786d0d81df3f67ce2bde2a96bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 39b093e264474d179ba742af6ec65a9cf9920b9788cc7cd195e7f5bbbbb7773a
MD5 4e2fc62ac7c986174aaaab67e2a44431
BLAKE2b-256 0dc3ea1c3b08c7461381193bdc1a5f682a6d612309b168daca69fa3b6e9115d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 293c2898c7a4d916333a5893c719ab910792ca86374ce821140383b429d804f0
MD5 1881a586011c5682b8293211a93aa0a0
BLAKE2b-256 c9b81196a817eff58e843f5c7613da2efcc9b352c9e97ff34417ba792d07325d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 a691d4a7acf96c38618083d87c494e4675fd6d721014c3aa532a869273bdd430
MD5 984b22e25329fc4c1afa6997981e205b
BLAKE2b-256 fa308982751c5c145338c44b974ea1af7dfcc3842adba3f4d9bb6739080416bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 b7e9665c01321a8f053704c687e3fcdebbfb65061a6af7d84d692ee0f94066bc
MD5 23b7b835346d836f28be2f198f029f66
BLAKE2b-256 89725b15dbf75395cfd7b9f15274caac76464786f787b7463448eb5192716526

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 8c402dfaff9aada0a7a34766dc637f9bfda66c03625ac79400154d43ae151187
MD5 b08e53458b72f518a321a1323f9f676a
BLAKE2b-256 c2d573ea2c99289613847fb9175cb8d594bab99fcdaa91613a20a842f948c04a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 fbc9c34020e01aafb7d6e046a54b421068a9c16ae46d9a53b3ccddef7d20f490
MD5 f135b7cf8b2a81b36e3754690f408475
BLAKE2b-256 1731f4e1b5577bb075a8a6dddb0aa77b9ad7b9c43bfdfc1ff71b24912b218c65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.1-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 09997733d0402eaa0bc702bd53df23c91b4ef87dffbd56e4c7becae65129a1fb
MD5 8b7bede2e63749ba47f273bdda8e43e2
BLAKE2b-256 946cddda3be72a0d6ef37c706667dc1c48850632aa52a35d75d1d314d8a75002

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