Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
summer_2019:getting_started [2019/07/30 04:07]
wellerd
summer_2019:getting_started [2020/02/12 04:33] (current)
tallpaul
Line 1: Line 1:
-====== Getting Started with Glowscript ​======+====Getting Started with Glowscript====
  
-The following is an introduction to using [[http://​www.glowscript.org|GlowScript]]a free online programming environment based on VPython+**Glowscript encounters some problems when using SafariPlease use Google Chrome as your browser when using Glowscript.** If you encounter any issues with Glowscript, log out and close your browserthen log back in and try again
  
-Try signing into an account and then selecting your empty list of programsClick "Create New Program" and name your program to open the code editor.+Throughout the course of this PD series, we will be using the Integrated Development Environment (IDE) Glowscript. Glowscript is a free, online server where users can write and compile Visual Based Python (VPython) code. In order to use Glowscript, follow the steps below: 
 +  * Go to the Glowscript homepage.http://​www.glowscript.org/​ 
 + 
 +  * In the upper right-hand corner of the page, there is a location to "Sign In." You do not need to create a user account to use Glowscript. Glowscript uses your existing google account as your user information. If you do not have an existing google ​account ​(gmail account), you will need to make one. If you do have an existing google account, sign in with that and click "​Allow"​ when prompted. 
 + 
 +  * Once logged in, the main display will change and show you are logged in. To access programs, click on "here" ​located at the end of the sentence, "You are signed in as //​username// ​and your programs are here."
  
 {{:​summer_2019:​glowscript_walkthrough.png|}} {{:​summer_2019:​glowscript_walkthrough.png|}}
  
-Once logged ​in, the Help button ​in the upper right hand corner of the screen contains a useful introduction along with tutorials and extensive descriptions ​for more details than what is presented here.+  * You are now in your programs menu. Hereyour programs will be organized by folders (tabs). Each time you begin a new computational problem, you should make a new folder. To do this, select "Add Folder,"​ and make sure you select "​Public."​ When you make a program ​in Glowscript, it is stored in **the users account you wrote the program in**. In order for your group mates to be able to access the program later, you need to make the folder public.
  
-===== Writing and Running a Program ​=====+  * Then, select "​Create New Program." You should be taken to a new screen where you will actually write the code. **Important:​** at the top of the program, it will have the following line, "​GlowScript 2.9 VPython."​ DO NOT DELETE THIS LINE. This is what imports the necessary functionality into the programming environment. If you delete this line, your code will not work.
  
-Try writing ​the following ​line of code below the Glowscript ​header in line 1. **Do not delete ​the Glowscript 2.8 VPython header from the top of your Glowscript programs.**+  * To make sure you are set to go, type the following code into a Glowscript ​code and run the program
  
-<​code ​python+<​code>​ 
-print("​Hello,​ World!"​)+sphere( )
 </​code>​ </​code>​
  
-Then, click "Run this program"​ to compile your code and run the programIf there are no errors or bugs in your codethen the program will successfully run to give you a text output.+  * Your display should now show a white sphere. You can now navigate between running the code (Run this Program) ​and editing ​the code (Edit this Program)Use two finger scrolling to zoom in, and use hold control while clicking ​to rotate the visuals once you run.
  
-===== Commenting Lines of Code =====+  * If you want to make your program display some text, edit your program by adding the following line of code, and then run your program again.
  
-It is good practice to comment each line of code you write to remind yourself what it does and why you wrote it. You can comment code by using the pound (#) symbol.+<​code>​ 
 +print("​Hello,​ World!"​) 
 +</​code>​ 
 + 
 +  * It is good practice to comment each line of code you write to remind yourself what it does and why you wrote it. You can comment code by using the pound (#) symbol. **It is important that you and others understand each line of code.** The comments are meant to externalize that understanding.
  
-<​code ​python>+<​code>​
 # This is a commented line in Glowscript # This is a commented line in Glowscript
 </​code>​ </​code>​
  
-**It is important that you and others understand each line of code.** The comments are meant to externalize that understanding.+  ​Make sure at the end of each computational day, you navigate back to the folder your code is in and copy and paste the URL into an email and send it to your teamThis will allow them to access your code at a later date. 
 + 
 +For more information and some example programs, see the "​Example Programs"​ section on the main Glowscript page. http://​www.glowscript.org/#/​user/​GlowScriptDemos/​folder/​Examples/​ 
 + 
 +Once logged in, the Help button in the upper right hand corner of the screen contains a useful introduction along with tutorials and extensive descriptions.
  • summer_2019/getting_started.1564459632.txt.gz
  • Last modified: 2019/07/30 04:07
  • by wellerd