The purpose of this intro to CS assignment is to give students practice with modularity and method design in a fun application: designing virtual 3D city environments. There are two versions of the assignment provided: one in C++ and one in Java. Both write HTML code to a file which renders the scene in a browser using three.js. Visual Studio code with a live web server extension makes it seamless to develop and update the 3D scenes interactively. Students start with various overloaded methods for drawing primitive 3D shapes (e.g. cylinders, ellipsoids, rectangular prisms) in different colors and proportions. Students then put these shapes together in methods that draw different city objects (e.g. tree, fire hydrant, stop light, sedan). In the process of making these methods, students practice reading method documentation of the primitive shapes, as well as writing their own method documentation for the method parameters specifying positions and orientations of each city object. Once the individual city objects are completed, students go up in abstraction to create a method that assembles a city block consisting of all of the objects together. They then finish the assignment with a method that calls the city block method in a loop to create an entire city consisting of multiple city blocks. After creating a basic city, students submit a creative virtual environment to a class gallery. A full description, along with amazing past student art contest submissions, can be found at http://www.ctralie.com/VirtualCities/
No takes yet. Share an insight, caveat, or question.
Christopher J. Tralie (2024) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: