Skip to main content

VPython for Jupyter Notebook

Project description

# VPython
This package enables one to run VPython in a Jupyter notebook, using the GlowScript VPython API, documented in the Help at http://glowscript.org. 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. The 3D scene appears in the Jupyter notebook, using the WebGL-based GlowScript 3D graphics library. 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.

For instructions on how to install Jupyter VPython, see http://vpython.org.

Here is a simple example that will run in a Jupyter Notebook cell:

```python
from vpython import *
sphere()
```

This will create a 3D window in the Notebook 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://mybinder.org/repo/BruceSherwood/vpython-jupyter)

Project details


Release history Release notifications | RSS feed

This version

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.5m Windows x86-64

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

Uploaded CPython 3.5m Windows x86

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

Uploaded CPython 3.5m macOS 10.6+ x86-64

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

Uploaded CPython 3.4m Windows x86-64

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

Uploaded CPython 3.4m Windows x86

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

Uploaded CPython 3.4m macOS 10.6+ x86-64

vpython-2.0-cp27-cp27m-macosx_10_7_x86_64.whl (2.5 MB view details)

Uploaded CPython 2.7m macOS 10.7+ x86-64

File details

Details for the file vpython-2.0.tar.gz.

File metadata

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

File hashes

Hashes for vpython-2.0.tar.gz
Algorithm Hash digest
SHA256 0c8771b244ea80e505fa5edf28e9eb4d51b961b1475521bc488f0ac033158637
MD5 1566e4e33bffc2320273215fe7894fa6
BLAKE2b-256 11b61a7ee9944d5ffd176324490a4fa6ab2d3c6afc0e2e8c8c16fbaf59f105e9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-2.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 4af7ee31efa1652887e2259b76d641e9788d3a6299b2f7e751efe252c45b1e54
MD5 d55882eb4d7211c84850868323948001
BLAKE2b-256 f48272dac593a64c2cbcb286def28e6a24a90b9d79f73ece5f4db277bd2e4a70

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-2.0-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 37bc902d9cd4bc003e5c1fef31de2c4c41e4fc74c99db1fb5530bce8d9cd112f
MD5 d8afb7ee43fda0448b35c0a105337f1a
BLAKE2b-256 709a6a1fe2227ff0be17ea51c384570310d681e28722fc861fdd46c443e07785

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-2.0-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 f0692b72322c90fc8445fccf27b6e52cdd570163d81f3db9f9f043bc782224ad
MD5 c8a012f8f997506126e14862eb26a68d
BLAKE2b-256 8156878fff3156c45385b5692122a78813c16dcaa1e42a048911da75c893abea

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-2.0-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 02885d5c040b8c39e7abd0c0c55fcd05f3a50e76932a91632f77026c1bedf05b
MD5 237f24abf84408a4d9661c9fe609d14f
BLAKE2b-256 6fa4f0624460bddf9a68b75da23d1e0cc4bf7520b4e6ca967d2bde5952036cd7

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-2.0-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 c32b0ae870c254655ef5bb8871cec5c7d0a3ee7d4327abb6625c42655a1a4fdc
MD5 ba80bbe7e87ae535112ffd3835f26e53
BLAKE2b-256 7d24b6d34b136e25ae0f0e9bf85f477dc19c118978c64f4876ad82c698c91920

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-2.0-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 c47c8de958f40fb77da9f89ba54260d20d744e3fcf2b091638f178db38bed887
MD5 474c505142740a4ce3bafab8d507a087
BLAKE2b-256 af61985c7088db49a64ef46ab3689c106fba4920515b5a6b354fe87868caf4fa

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for vpython-2.0-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a976fc8e2aafeb02867b75e0955c61a183182e1007f79e69491e3edbf27a5305
MD5 c57787cc0456e15fbaf5d573e4a742b8
BLAKE2b-256 765dd4306ff5b5b71f9f2079e40115b703a1168dd0554364cca2f6bdb8f74c37

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page