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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vpython-1.0.2.tar.gz (275.2 kB view details)

Uploaded Source

Built Distributions

vpython-1.0.2-cp35-cp35m-win_amd64.whl (259.2 kB view details)

Uploaded CPython 3.5mWindows x86-64

vpython-1.0.2-cp35-cp35m-macosx_10_6_x86_64.whl (263.9 kB view details)

Uploaded CPython 3.5mmacOS 10.6+ x86-64

vpython-1.0.2-cp34-cp34m-win_amd64.whl (259.0 kB view details)

Uploaded CPython 3.4mWindows x86-64

vpython-1.0.2-cp34-cp34m-macosx_10_6_x86_64.whl (263.7 kB view details)

Uploaded CPython 3.4mmacOS 10.6+ x86-64

vpython-1.0.2-cp27-cp27m-win_amd64.whl (260.8 kB view details)

Uploaded CPython 2.7mWindows x86-64

vpython-1.0.2-cp27-cp27m-macosx_10_6_x86_64.whl (264.5 kB view details)

Uploaded CPython 2.7mmacOS 10.6+ x86-64

File details

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

File metadata

  • Download URL: vpython-1.0.2.tar.gz
  • Upload date:
  • Size: 275.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vpython-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ee54e5d7adabb5775d05dd139eb0ca1a352f21a36567bcdc76c503c305428e44
MD5 f794fd65e97afd41d489bc92fbb77c34
BLAKE2b-256 3ff21f0d7b3d5f8d8dbcd856e5b390d40e35a126de8cd37dd6e82a40a3775ff7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 f2300142e22cdcae4a852bebad6a4c539853cb0a5c1d192eb3bdc8304434ee8f
MD5 3f499b85c0901f0d497219fc6811552c
BLAKE2b-256 6b1befeb193a2ec1d138c62751d7569cfcd6d0f805a3304d4cb13903eda290da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.2-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 664717bac65d4e835b62e6f6e5ad89ad33ef010c1dfe3775334afc52ce6fcf00
MD5 30a1431c296ed856664890e6a5b0fbd1
BLAKE2b-256 168df4d6ca9c1446341a6ec9848faae3c0314578bf6bc8fb2ed930768e05352e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.2-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 4b49c4e28432b3f77284eb56682c80f6480b25c1105eb002eca8be6b0c3238ab
MD5 347908d50c584a5c640f8c7ab45508d5
BLAKE2b-256 926ef9e987b38c117ae9ea783d11e3af9db731639c0d41907a5be562fb1a32b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.2-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 9d63aa21aeb9f5afda8093759d98ec9458fa95acf7589b2e7549745d7cef9c90
MD5 19a13b6cbe40def23d79cf21b7bfc91d
BLAKE2b-256 a62fd479b97a8907438e764927a077c7184ff66e335f2618d43137834cd2bacf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 141002875103cb668eb6806162b1e20314383b8f261de38ab2dcf5c04dfe1830
MD5 2332a8a7678344d319e062e6c42ae63e
BLAKE2b-256 c10fab9f4c0fe603cfd73606f534caab1c6bf29565cc280682967b318ea17870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-1.0.2-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 a6a0d2db4290b0745c968e84560cd6397dffa25fe208efe7c94a3fc4a4a3a487
MD5 e2464d0cfe09803012e7b3116f828dc3
BLAKE2b-256 2381a7daf5e1c5cbc306c6ada95c5b3843c9cdd4641b08075de2e6af10dd9316

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