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

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.6mWindows x86-64

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

Uploaded CPython 3.6mWindows x86

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

Uploaded CPython 3.6mmacOS 10.7+ x86-64

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

Uploaded CPython 3.5mWindows x86-64

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

Uploaded CPython 3.5mWindows x86

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

Uploaded CPython 3.5mmacOS 10.7+ x86-64

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

Uploaded CPython 3.4mWindows x86-64

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

Uploaded CPython 3.4mWindows x86

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

Uploaded CPython 3.4mmacOS 10.6+ x86-64

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

Uploaded CPython 2.7mWindows x86-64

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

Uploaded CPython 2.7mWindows x86

vpython-7.1.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for vpython-7.1.3.tar.gz
Algorithm Hash digest
SHA256 adec58a7d6ee9ca121342db45eaec513d4786dd3b579a44b246cc401984dd54a
MD5 7cc3ee8f6a62f8650d69b903507ebf7c
BLAKE2b-256 1d5fbfe5393f1cfb6c6bea6836623d28fe0ef8075ddfbb3417b8df275e212f2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 46d01340420f38f8401df5d2ce38b4ecf30bd0b50ba8d175f0b7c62ef3f31804
MD5 eae29631c675290f1e349a15b183ec82
BLAKE2b-256 2632ddea25fea5172f74bb79b175e75a0f167af346c655185ae0c2d05ef2536c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 1a3b19721cc49a7ef95dfd0e36a8bc90cb2159d559ca323cb1b574c99434af9e
MD5 d7220c8dc3d5a69df0af4ce09b10fdde
BLAKE2b-256 2adb527332b528a5dbf552f834fa02b2520ac5d911c859f7100982e78b2107e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 2bd3c64136bb87d4692b5b60bcecb8bf81e4eef821ed334dbaf59bc1fd2e83ed
MD5 1c28bef9a0c376a40c331c260fd30fd4
BLAKE2b-256 e31f6c124abc8ff6e99aa5029adc0f96d144f277c71f398fe8e032ef36dad3cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3af612c307a9b6531a4830a1448f0c091ae44f8ea22be2497089b261f780e6dc
MD5 116f450bafa6d15c307e8335542c61de
BLAKE2b-256 858ea2f1469850a08a65f38adea67c23b00565e087f2c8f485d6042ef5b28917

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 b9a158d1277a8d25f49dcb73f7bceb723eec994fda8ad898e6b97d920efe1212
MD5 0f87990e68668117598dca7c8662302a
BLAKE2b-256 547db6fd56abeff1f8794d0bef1c06b488568df0154dfa1f17b653b9d50aba2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f3803157f6efa6ac20ea782730dd96efd8779f228a1584c65019d296db22cc05
MD5 cb3b3fe7dd13e0d66e8289870092d1b8
BLAKE2b-256 2e68f1ca6d28d1e277a5bf5f7716c17c810b8130b22585655fa0b73c795e3ade

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp34-cp34m-win_amd64.whl
Algorithm Hash digest
SHA256 12d8368cb016a525d77c46dcb00475c3d2b767872871b5d8bd57b93e9c5f528f
MD5 0f64127efc648eae64ee3fc4558b6b7b
BLAKE2b-256 6b04d961681da5856a249bf56cc0afcaa21a8b13253481f32bb38caed91f6560

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp34-cp34m-win32.whl
Algorithm Hash digest
SHA256 4d8c4cfb081412353e24eee8c005ccbf55706857339618078baea4f837ae8ceb
MD5 b83e9c3cb80b46a629fde1661ab2fad0
BLAKE2b-256 a1fa94d475228a6dc4cfd30f6966d2ebef007c834bc330103dc10d4ac508d32e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 d4282a5d49fdc19011083f257a4cffc26f99da902c08467369e6056fab6a270b
MD5 bc74f31a49373f0f549fc9e3d7f21577
BLAKE2b-256 a14315b5426b1d59551b10dac813456f14393cc736ce598ed2eb95845916d964

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 a6a5f00678b5ebd169502639803a53efc195ac64120d866b75671568b9fec666
MD5 bb10a358b18328af7f3df4bcf20d2ad0
BLAKE2b-256 814040357eb75f2221a27621fd30d9f706ea43585a649514486e26c3d38a2a32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 f9dd1f0d01f1eb8598778eb551b9d682996a9e6ca5b445935b13aecadf4223e4
MD5 9743a16bac23b7874b75df430e9bd01d
BLAKE2b-256 ec94f8eec5029b689d8fdfa2cb51cbe1f22f6f14670eedaf00141f5876584081

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vpython-7.1.3-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 6552a0b2ef647cbe649a580819eabb9d67c258cb7270db7c7e4bcf7025c606d5
MD5 93381a1606a7a143fdae4602a32a7540
BLAKE2b-256 083d07d0f47056a86f6804abf140acf1440634bb65d794d9eae54d5fa8f2c569

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