Page 7: A Car for Graphics Town (ex 5)

CS559 Spring 2021 Sample Solution - Workbook 9

Written by CS559 course staff

You can try out the example solutions here. The interesting code is on page 5, page 6 and page 7.

The pedagogical goals of this exercise are to give you practice defining shapes with meshes and adding textures to them.

In graphics town, you will need vehicles. A cars, trucks, trains, or maybe other things.

So in this page, please make one. It has to have wheels on the ground. But other than that, few restrictions - you can have a primitive (like a box or something) for the body. The vehicle must either have shape or texture to make it look like a car/truck/train.

Here are some simple ones from that 2000 graphics town I mentioned. You should be able to make something nicer.

If you want a simple train made out of primitives, you can look at this tutorial for a simple train made out of primitives. If you use it, be sure to give attribution (and put it into the graphics town framework).

To get the points for this page, you just have to have a simple car (defined as a GrObject in 09-07-car.js and placed into the world in 09-07-01.js). Of course, it can be a fancier vehicle. Don’t worry about making it drive around (that’s a future workbook).

You will need vehicles for the future assignments, so effort you put into making nice vehicles now will pay off in future workbooks. You can make more vehicle types later - but you may want to do some of the work now.

Please do not re-use one of the pieces of construction equipment you made for the previous workbook.

The rules for finding and importing object files and textures are the same as for Page  6  (Graphics Town Buildings (Exercise 4)).

Your Vehicles should be subclasses of GrObject. Your work goes into 09-07-car.js and modify 09-07-01.js. You’ll see it in 09-07-01.html. Please explain how you made each vehicle in 09-07-01.txt.

This is the end of workbook 9.

Page 7 Rubric (18 points total)
Points (14):
Box 09-07-01
8 pt
Car or Vehicle (looks like a car or other vehicle)
Box 09-07-01
5 pt
Has texture (or at least coloring)
Box 09-07-01
1 pt
Vehicle described in txt
Bonus points (4):
Box 09-07-01
2 pt
fancy vehicle
Box 09-07-01
2 pt
more than 1 vehicle type