VPython is an easy-to-use, powerful environment for creating 3D animations.
Here at glowscript.org (or webvpython.org, which takes you here),
you can write and run VPython programs right in your browser, store them in the
cloud for free, and easily share them with others. You can also use VPython with installed Python:
see vpython.org.
The Help provides full documentation.
Welcome to VPython, a Trinket tutorial, is useful for anyone new to programming in VPython.
See the
Example programs.
To get started writing your own programs you need to Sign in.
You are signed in as
username and your programs are
here.
Your files will be saved here, but it is a good idea to backup
your folders or individual files occasionally by using
the download options that are provided.
VPython is an easy-to-use, powerful environment for creating 3D animations.
Here at glowscript.org (or webvpython.org, which takes you here),
you can write and run VPython programs right in your browser, store them in the
cloud for free, and easily share them with others. You can also use VPython with installed Python:
see vpython.org.
The Help provides full documentation.
Welcome to VPython, a Trinket tutorial, is useful for anyone new to programming in VPython.
See the
Example programs.
To get started writing your own programs you need to Sign in.
You are signed in as
username and your programs are
here.
Your files will be saved here, but it is a good idea to backup
your folders or individual files occasionally by using
the download options that are provided.
Are you sure you want to make this folder PRIVATE?
Are you sure you want to delete this program? This action cannot be undone!
Are you sure you want to delete this folder?
There are several ways to share or export a program:
- You can publish a link to . Anyone can run the program here
at glowscript.org, or view its source, without having to sign in.
The program must be in a public folder, not a private folder.
- You can publish a link to an entire public folder: .
- Export: you can embed the program, including from a private folder,
directly in your own web page, using the HTML code provided below.
If your page already uses jquery, you should delete that <script> tag.
- Another option is to save the HTML code shown below in a file ending in ".html", then
doubleclick the html file and it will run in your browser.
- Or simply clickDownload as HTML and then double-click the downloaded file to run it.
Some browsers display the file name at the bottom of the page, and a single click on the name will run the program.
- You can also place the html file in an iframe portion of a web page by placing in the html of the web page a statement like this
:
<iframe src="test.html" width="320" height="340"></iframe>
where "test.html" is the location of the program relative to the location of the iframe statement, and where
the program has a canvas somewhat smaller than 320 by 340.
- You may have a need to allow anyone to run the program but to keep the program's original source code private.
It is not possible to hide JavaScript code from a user of the program (rightclick the web page and
choose "View page source" or use the browser debugger), but you can "minify" the program to make
it so difficult to read as to make it effectively private. To do this, in the HTML code above, copy the code from "// START JAVASCRIPT"
through "// END JAVASCRIPT" and paste it into a "minifier" such as the one at
javascript-minifier.com, and then replace the START-END code with
the output of the minifier. You will see that it is very difficult to understand the minified program, even if
you pass it through a "beautifier" program, because many of the variable names have been replaced by single letters.
If the area below is blank, the program has errors.
Fix the errors and then try again.