VPython for Jupyter Notebook
Project description
# VPython
This package enables one to run VPython, using the GlowScript VPython API, documented in the Help at http://glowscript.org. It can be used in a Jupyter notebook or run from IDEs such as IDLE or Spyder. 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 a browser page or a Jupyter notebook, using the WebGL-based GlowScript 3D graphics library. This implementation of VPython was begun by John Coady in May 2014 with further development by Ruth Chabay and Bruce Sherwood and with installers built by Matt Craig. The repository for the source code is at https://github.com/BruceSherwood/vpython-jupyter.
For instructions on how to use VPython, see http://vpython.org.
Here is a simple example of VPython code:
from vpython import *
sphere()
This will create a 3D 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://mybinder.org/repo/BruceSherwood/vpython-jupyter)
VPython programs that don't import other Python modules can run without change at glowscript.org, which uses the RapydScript-NG Python-to-JavaScript transpiler to enable compilation and execution in the browser, without installing any software.
This package enables one to run VPython, using the GlowScript VPython API, documented in the Help at http://glowscript.org. It can be used in a Jupyter notebook or run from IDEs such as IDLE or Spyder. 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 a browser page or a Jupyter notebook, using the WebGL-based GlowScript 3D graphics library. This implementation of VPython was begun by John Coady in May 2014 with further development by Ruth Chabay and Bruce Sherwood and with installers built by Matt Craig. The repository for the source code is at https://github.com/BruceSherwood/vpython-jupyter.
For instructions on how to use VPython, see http://vpython.org.
Here is a simple example of VPython code:
from vpython import *
sphere()
This will create a 3D 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://mybinder.org/repo/BruceSherwood/vpython-jupyter)
VPython programs that don't import other Python modules can run without change at glowscript.org, which uses the RapydScript-NG Python-to-JavaScript transpiler to enable compilation and execution in the browser, without installing any software.
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.0.0.tar.gz
(2.5 MB
view hashes)
Built Distributions
Close
Hashes for vpython-7.0.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e334ca429c3ff73e2d01651febc8f22d959aff34f093afdcb9681300b9e3ab05 |
|
MD5 | 5f4e38783e98283c169661190d960d5b |
|
BLAKE2b-256 | 13822ae19d9a0a2985a571216651bc0e77abef3a94148b8c9db4873b6cbbc380 |
Close
Hashes for vpython-7.0.0-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a6bcc82d9ed69fa40e57a3bbe18ee133ae967f9a5801c30fa69876ec5cf8d74 |
|
MD5 | b842cc23041fba4ffd1d650ec892484a |
|
BLAKE2b-256 | d87b6565e1a73966bd2ef009f6bd7e21b0ff68205efd558a800d7c6614beda21 |
Close
Hashes for vpython-7.0.0-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a370a7c8d374a8d060c775e499bdeae0d29ac6c14d58e2bfa57d6f1ca03f093 |
|
MD5 | 575163401a178fac24a66b83669a0b0e |
|
BLAKE2b-256 | 75d029ea8e03dcdf5a24a486a8dc4e5abb76859882634a97f5d4f64d03755388 |
Close
Hashes for vpython-7.0.0-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47e6392dbae2caab7b60aead488e936d23df0865656c92002e65ff39aad68018 |
|
MD5 | 824378d671feffdd3385923eb26b8752 |
|
BLAKE2b-256 | 420a912907067dc1612285dd2cea4e28e5210a2b02d0691875aad7bea144e3ed |
Close
Hashes for vpython-7.0.0-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12e4c281f808d2ec551248c0a37d309269086a55eb406ee701c1c35b1ad8deb9 |
|
MD5 | 047a8be49c9934be9e7b7552c8d1ad4a |
|
BLAKE2b-256 | f1456385cf96c8787bf953be674d956b6d218bfb01161c095213a206bae8e56d |
Close
Hashes for vpython-7.0.0-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 498f957ff6229e014ef9824f4533304ae68c8539e96705c5f7b50e3401f806e6 |
|
MD5 | 3b402848cc1659d4dc66c89f200a7716 |
|
BLAKE2b-256 | d1d74bbdff18050b227bb54207410b61907c7f033bf58b649c09b0aae3ba426f |
Close
Hashes for vpython-7.0.0-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92eeb075d171e9840a76333a13bd4bb763623f87efd9bdeca9ff593913f6f7f2 |
|
MD5 | e2c3eb365c8ca7e0e8d656cac35f3560 |
|
BLAKE2b-256 | 362c31ffffb7516bba9abd193ea64e8ee94ce0605400ec5fccd9ad1f11f02331 |
Close
Hashes for vpython-7.0.0-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e27a42edac735cf56f47d51f8a0ef224f06fab47f69e206e1d75888003aecdce |
|
MD5 | e9e1f0028fd076c619d46840067e5464 |
|
BLAKE2b-256 | 3c74617443fd7b5c23f22752665c021a3a17b1f2f1f307d954b6840d77ae88dd |
Close
Hashes for vpython-7.0.0-cp34-cp34m-macosx_10_6_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 939a89386c845829c03449a0330dd04fb821215483ac1869a136fb25cf2ce5e1 |
|
MD5 | 36c4d574f54e237987a86ebdb858e671 |
|
BLAKE2b-256 | c8af78706368386626f7ba41934949b4ba10a45c08463c179ea5f06cb8b0e671 |
Close
Hashes for vpython-7.0.0-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c9e7efb37bcdba6b86f8cf79bab701841edd3ef8c2035e83cad78529bc75f7a |
|
MD5 | 10a10b769fea5e82222cc1c9bb5347e7 |
|
BLAKE2b-256 | ad321a56e761f703195c49e170fb2d0947e883a54474790c0450d4fe8154fee8 |
Close
Hashes for vpython-7.0.0-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2de332320304d02cfae2e3a33b3e76c43958eda9d02b9c7719238c1eb890f73a |
|
MD5 | 5522e708c4168de75f6edadc8b2de867 |
|
BLAKE2b-256 | 777f47f95051dc34aedb8bcf7323062ce147a4563cd09a09d558c96f32fa4acd |
Close
Hashes for vpython-7.0.0-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e614aa3af4385123ce7013632781018770700a216329c5da7e102b8af56951a2 |
|
MD5 | c8bd4870fc260aa15d313fec9d301bfd |
|
BLAKE2b-256 | 7ac6bcab2f06728ff59441334e50b5fe92384cb1ad1f3d23bc14bce5c255c4e5 |