View on GitHub

Turtle-Graphics-2

CS-1400 Project 5

Project 5: Turtle Graphics 2

turtle

Questions & Answers

<– Back to project directions

How do I scale an entire scene?

Everything you draw has size and dimensions. To make something “smaller” you use smaller sizes. To make it bigger you use bigger sizes. When you scale a group of objects together, you have to scale distances between things as well as sizes.

How do I use a scaling factor?

Consider this. In “the old days”, the only random number generators we had would generate random numbers between 0 and 1. But what if I want a number between 0 and 9 instead? I would generate a number x and then multiply it by 10. What if I want a number between 0 and 49? I would multiply it by 50 instead. Here 10 and 50 are scaling factors.

How can I put one scene inside another?

As mentioned above, we’ve all seen pictures where the same picture is drawn smaller inside a picture. There are 2 main parts to drawing a small scene: scaling (see question above) and location. When we draw something in the turtle window at a particular location, we often assume the coordinates are relative to 0,0. But things can be drawn relative to another reference point as well, like the upper left corner of a bounding box (rectangle) in a drawing. This is what you assume already when you give the turtle a command like “forward(50)” or “right(90)”–it’s relative to where the turtle is, not using the absolute position or the absolute angle from 0.

Does this project have to be different from Turtle Patterns I or can I use that one?

It’s usually less work if you modify and add on to your Turtle Patterns I project, but you can do something completely different if you want.

Does it have to be a scene or a landscape, or can I draw something else entirely?

It does not have to be a scene or a landscape as long as your result satisfies the test cases listed under grading, which are the same as the rubric. Keep in mind though that drawing a shape or pattern “smaller” does not necessarily qualify as drawing a scene smaller. If it’s not clear how you are doing that, you’d have to explain in your comments how your code satisfies that test case, for example.

<– Back to project directions