Learning Math and CS/STEAM with Robotics
Sign In

CSP Unit 3 Lesson 8.6

Linkbot Image Mindstorm Image
Grid Size: S M L Simple View: MinView:
CSP Unit 3 Lesson 8.6

Using your newly defined traceTriangle function block (instructions above), add the code to it that turns off the trace, uses the drivexyTo command to move the robot to the point (x,y), turns on the trace, uses another drivexyTo command to draw the bottom side of the triangle, and then uses turnLeft and driveDistance commands to draw the other two sides of the triangle. We have pre-placed in the Workspace the drivexyTo command that draws the bottom side, so you can simply drag it into the function definition when needed. Once the function is defined, add code to the Workspace that calls it twice to draw a triangle of side length 10 and left corner at (8, 8) and a triangle of side 14 and left corner at (18, 15).

Workspace Load Save Ch Ch Shell Console
Rubbish bin