1
ic01
CCS CS20 S18
Name:
(as it would appear on official course roster)
Umail address: @umail.ucsb.edu
Optional: name you wish to be called
if different from name above.
Optional: name of "homework buddy"
(leaving this blank signifies "I worked alone"

ic01: Planning your tree for project01

ready? assigned due points
true Tue 05/15 12:30PM Tue 05/15 12:30PM

You may collaborate on this homework with AT MOST one person, an optional "homework buddy".

This assignment should be submitted by scanning the pages in the correct order to a PDF file and uploading to gradescope.com.

For more information, visit ucsb-cs8.github.io and look for Gradescope: Student Self Submission under "topics".

Even though it is a Gradescope submission, nevertheless, *please fill in the information at the top of this homework sheet*, including your name and umail address.


THE FINE PRINT: This worksheet is to be completed in class on 05/15.</b>

  1. (10 pts) Please fill in the information at the top of this homework sheet, as usual. WRITE DARK, and remember, if you MUST submit it on multiple sheets, JUST write your name at the top of both sheets and turn in both sheets UNCONNECTED. No staples, paper clips, fold/tear etc or anything that would jam up the scanner.

  2. Please look over the instructions for project01 on the course website then plan out your tree by answering the following question

    Have a TA or instructor review your work. Then you can use it as a basis to code your solution to project01. There are more grids on the back for part c (in case you spoil one of them and need to start over). If you use more than one grid please mark which one you would like to be graded. Your first task is to determine the coordinates of the four corners of a bounding box for your tree. Assume that the bottom left corner of the bounding box is (startX, startY) which is also the position of the turtle when your drawTree() function is called. You are only given the starting location of the turtle (startX, startY) and the height of the tree: height. Notice that you can choose any width for the tree that scales with the height of the tree (taller trees must be wider)

    a. (15 pts) Fill in the blanks on the next page to determine the width of the tree in terms of the height and the coordinates for the top right corner (topRightX, topRightY) and the bottom right corner (bottomRightX, bottomRightY) of the bounding box. The coordinates for the top and bottom right corners must be expressed in terms of: startX, startY, width and height

    bounding box

    
    width = _________________
    
    topLeftX = startX 
    
    topLeftY = startY + height
    
    topRightX =   ______________
    
    topRightY =    _____________
    
    bottomRightX = _____________
    
    bottomRightY = _____________
        
    

    b. (5 pts) Label the coordinates of the points in the given diagram (4 corners of the bounding box) as (startX, startY), (topLeftX, topLeftY), (topRightX, topRightY), (bottomRightX, bottomRightY)

    tree coords

    c. (70 pts) Label the coordinates of all the points in the figure on the left and write Python assignment statments below to quantify them in terms of startX, startY, width and height

    tree coords

    c. Label the coordinates of all the points in the figure on the left and write Python assignment statments below to quantify them in terms of startX, startY, width and height