Learning Math and Coding with Robots                                         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 Hardware Units: US Customary Metric
 Background: Robot 1  Initial Position: ( in, in) Initial Angle: deg Current Position: (0 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

Robot 2  Initial Position: ( in, in) Initial Angle: deg Current Position: (12 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

Robot 3  Initial Position: ( in, in) Initial Angle: deg Current Position: (24 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

Robot 4  Initial Position: ( in, in) Initial Angle: deg Current Position: (36 in, 0 in) Current Angle: 90 deg Wheel Radius: 1.75 in1.625 in2.0 in Track Width: in

Animate a Truck on a Road in One-Point Perspective
Problem Statement:
In this activity you will animate a truck driving forward on a road in one-point perspective. The pre-placed blocks give x-values in terms of the variable x for every shape within a loop that counting by x. The equations for the lines starting at the vanishing point through the midpoint of each ellipse(wheel) is given. Use these equations to write expressions in terms of x for the y-values of the ellipses. Then find equations for the red lines generated by the board blocks, and use these equations to find expressions for the y-values of each of the quadrilaterals.
/* Code generated by RoboBlockly v2.0 */
#include <chplot.h>
double x;
CPlot plot;

// y1 = -5x + 216
// y2 = -3x + 144
// y3 = -0.8181818182x + 65.45454546
// y4 = -1.363636364x + 85.09090909
for(x = 0; x <= 3; x += 0.5) {
plot.strokeColor("black");
plot.fillColor("#666666");
// y = -3.75x + 171
plot.ellipse(44 - x * 1.5, (44 - x * 1.5) * -3.75 + 171, 4 - x * 0.75, 6 - x * 1, 0);
// y = -1.578947368x + 92.84210526
plot.ellipse(55 - x * 3.5, (55 - x * 3.5) * -1.578947368 + 92.84210526, 4 - x * 0.75, 6 - x * 1.25, 0);
// y = -4.4x + 194.4
plot.ellipse(41 - x * 0.9, (41 - x * 0.9) * -4.4 + 194.4, 2 - x * 0.75, 3 - x * 0.75, 0);
plot.fillColor("#c0c0c0");
plot.quad(42 - x * 1.1, (42 - x * 1.1) * -5 + 216, 42 - x * 1.1, (42 - x * 1.1) * -3 + 144, 58 - x * 4.1, (58 - x * 4.1) * -0.8181818182 + 65.45454546, 58 - x * 4.1, (58 - x * 4.1) * -1.363636364 + 85.09090909);
plot.quad(42 - x * 1.1, (42 - x * 1.1) * -3 + 144, 40 - double(x)/1.5, (40 - double(x)/1.5) * -3 + 144, 50.5 - x * 2.5, (50.5 - x * 2.5) * -0.8181818182 + 65.45454546, 57.85 - x * 4.1, (57.85 - x * 4.1) * -0.8181818182 + 65.45454546);
plot.quad(40 - double(x)/1.5, (40 - double(x)/1.5) * -5 + 216, 40 - double(x)/1.5, (40 - double(x)/1.5) * -3 + 143.5, 42 - x * 1.1, (42 - x * 1.1) * -3 + 144, 42 - x * 1.1, (42 - x * 1.1) * -5 + 216);
delaySeconds(0.001);
}

plot.label(PLOT_AXIS_XY, "");
plot.grid(PLOT_OFF);
plot.tics(PLOT_AXIS_XY, PLOT_OFF);
plot.axis(PLOT_AXIS_XY, PLOT_OFF);
plot.axisRange(PLOT_AXIS_XY, 0, 72);
plot.ticsRange(PLOT_AXIS_XY, 6);
plot.sizeRatio(1);
plot.plotting();
 Blocks Save Blocks Load Blocks Show Ch Save Ch Workspace
Problem Statement:
In this activity you will animate a truck driving forward on a road in one-point perspective. The pre-placed blocks give x-values in terms of the variable x for every shape within a loop that counting by x. The equations for the lines starting at the vanishing point through the midpoint of each ellipse(wheel) is given. Use these equations to write expressions in terms of x for the y-values of the ellipses. Then find equations for the red lines generated by the board blocks, and use these equations to find expressions for the y-values of each of the quadrilaterals. Time