This post is part of a course on geometric modeling at the Summer Liberal Arts Institute for Computer Science held at Carleton College in 2021.
In a normal year, you attend SLAI on campus at Carleton, and we provide you with food and computers. Since we’re online this summer, it’s BYO. Nonetheless, by the end of this lesson, I will give you both a pretzel and a computer that lives in the cloud.
Not all of us have powerful computers on which we can install software, so we instructors have built our course activities around technologies that anyone with a web browser and an internet connection can access. Herein I describe how to set yourself up for these activities in our course on geometric modeling.
Follow these steps to claim your pretzel and computer-in-a-browser.
- Create an account on GitHub. GitHub is a company that keeps code and other files on their computers, instead of just your computer, so that many people can access them. We won’t be using GitHub’s services directly. However, the development environment we are using expects you to have a GitHub account.
- Visit CS50 IDE and log in with your GitHub credentials. This is a browser-based development environment made by folks at Harvard University to teach their massive introductory programming course. Upon logging in, a remote computer is made for you. You operate this computer through the web browser. It doesn’t have all the features of a real computer. However, it gives you everything you need for this course: a text editor, a web browser, and a terminal in which to run commands.
- Click File / New File and paste in the following HTML:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>SLAI 2021: Geometric Modeling</title> <script src="https://email@example.com/build/three.js"></script> <script src="https://firstname.lastname@example.org/examples/js/controls/TrackballControls.js"></script> </head> <body> 🥨 </body> </html>
- Save the file. Click File / Save As and use the name
- Start up a web server to render the web page. In the terminal at the bottom of the window, enter the command
- View the web page in a web browser. Click on the link in the output of the command and choose Open in Preview. At the end of the URL in the location bar, add
index.html. You should see a pretzel.
- Make both the code editor and the browser visible at the same time. Click View / Layout / Vertical Split. Drag one of the windows around by its tab to the empty column.
- Share your machine with your instructors. Click on the Share button in the top-right corner. (You may need to allow popups.) Invite users