Learning Math and Coding with Robots

0x126-6-12y126-6-12
Grid:
Tics Lines:
Width px
Hash Lines:
Width px
Labels:
Font px
Trace Lines:
Robot 1:
Width px
Robot 2:
Width px
Robot 3:
Width px
Robot 4:
Width px
Axes: x-axis y-axis Show Grid
Grid: 24x24 inches 36x36 inches 72x72 inches
96x96 inches 192x192 inches
Quad: 4 quadrants 1 quadrant
Units: US Customary Metric
Background:

Robot 1

Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (2.4 in, -6 in)
Current Angle: 109.46 deg
Wheel Radius:
Track Width:
in

Robot 2

Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (4 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 3

Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (8 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Robot 4

Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (12 in, 0 in)
Current Angle: 90 deg
Wheel Radius:
Track Width:
in

Spider Crawling up a Web
Problem Statement:
The blue spider just made a web strand going from corner A of a cardboard box to corner D. It now needs to crawl back up to the top. Knowing that the dimension of the box is H x L x W = 12.3" x 8.4" x 5.59", calculate the required traveled distance of the spider and drive the linkbot along the web strand path using driveDistace(). Round to 3 decimals point - tip: to avoid precision error, don't round until the end.
/* Code generated by RoboBlockly v2.0 */
#include <linkbot.h>
double H;
double W;
double L;
CLinkbotI robot;
double radius = 1.75;

robot.traceColor("green", 3);
H = 12.3;
W = 8.4;
L = 5.59;
// set the %.#lf in printf() for 3 digits after the decimal point for double type
robot.driveDistance(sqrt((H * H + W * W) + L * L), radius);
Blocks Save Blocks Load Blocks Show Ch Save Ch Workspace
Problem Statement:
The blue spider just made a web strand going from corner A of a cardboard box to corner D. It now needs to crawl back up to the top. Knowing that the dimension of the box is H x L x W = 12.3" x 8.4" x 5.59", calculate the required traveled distance of the spider and drive the linkbot along the web strand path using driveDistace(). Round to 3 decimals point - tip: to avoid precision error, don't round until the end.

		
Time