The first parameter “idx” equals to 0 only for the first time this function is called.
you just need to fish the “drawLab(idx=0, row_cap=4, total=20)” function, which using recursion to draw all the desks and computers in the lab. Here you can adjust the parameters of “row_cap” and “total” to generate different number of desks. The first parameter “idx” equals to 0 only for the first time this function is called. Then idx should increase by 1 every time when it is called.
Rubrics:
(1) Free of grammar errors (15%)
(2) Free of infinite recursion (15%)
(3) Accurately update the parameters for recursion call (10%)
(4) Accurately compute the “pos” member for the desk and computers (20%)
(5) Successfully draw all the computers and desks in the lab (20%)
(6) Provide a report document “.docx” or “.pdf” file to describe what you have accomplished and include two or more snapshots of the rendered lab pictures.
x2 = top_bound + (1/2) * desk.depth
y1 = left_bound + (1/5) * desk.length
y2 = left_bound + (1/2) * desk.length
y3 = left_bound + 1.2 * desk.length
y4 = left_bound + 1.6 * desk.length
rand_x = random.uniform(x1, x2) # for computer 1
rand_y_1 = random.uniform(y1, y2) # for computer 1
computer1 = computer_module.ComputerSet(pos= [rand_x, rand_y_1, desk.pos[2] + 5])
computer1.draw()
rand_x = random.uniform(x1, x2) # for computer 2
rand_y_2 = random.uniform(y3, y4) # for computer 2
computer2 = computer_module.ComputerSet(pos= [rand_x, rand_y_2, desk.pos[2] + 5])
computer2.draw()
# step3: draw the desk
desk.draw()
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
