Learning Math and Coding with Robots

Linkbot Image Mindstorm Image Cursor Image
0x726048362412y726048362412
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: Background Image

Robot 1

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (18 in, 48 in)
Current Angle: 0 deg
Wheel Radius:
Track Width:
in

Robot 2

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (30 in, 30 in)
Current Angle: 8 deg
Wheel Radius:
Track Width:
in

Robot 3

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (48 in, 36 in)
Current Angle: 180 deg
Wheel Radius:
Track Width:
in

Robot 4

Linkbot
Mindstorm
Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (60 in, 50 in)
Current Angle: 180 deg
Wheel Radius:
Track Width:
in

Basketball Team
Problem Statement:
The pre-placed blocks will give you everything needed for the program. Your goal is to edit the loop of the ball in the given code to make it look like the linkbot is passing the ball to the other linkbot and the mindstorm is trying to block them.
/* Code generated by RoboBlockly v2.0 */
#include <chplot.h>
#include <linkbot.h>
#include <mindstorms.h>
double i;
CPlot plot;
CLinkbotI robot1;
double radius1 = 1.75;
double trackwidth1 = 3.69;
CMindstorms robot2;
double radius2 = 1.1;
double trackwidth2 = 4.54;
CMindstorms robot3;
double radius3 = 1.1;
double trackwidth3 = 4.54;
CLinkbotI robot4;
double radius4 = 1.75;
double trackwidth4 = 3.69;

plot.noStrokeColor();
plot.fillColor("white");
robot1.setSpeed(3.5, radius1);
robot1.drivexyToNB(26, 36, radius1, trackwidth1);
robot2.setSpeed(3, radius2);
robot2.drivexyToNB(32, 36, radius2, trackwidth2);
robot3.setSpeed(3, radius3);
robot3.drivexyToNB(60, 36, radius3, trackwidth3);
robot4.turnLeftNB(90, radius4, trackwidth4);
for(i = 1; i <= 12; i++) {
  //plot.backgroundImage("basketballCourt.png");
  plot.circle(18 + i, 48 + i * -1.5, 2);
  delaySeconds(0.48);
}
robot4.setSpeed(3.5, radius4);
robot4.drivexyToNB(60, 24, radius4, trackwidth4);
robot2.setSpeed(3, radius2);
robot2.drivexyToNB(56, 26, radius2, trackwidth2);
robot1.drivexyToNB(52, 46, radius1, trackwidth1);
robot1.turnRightNB(90, radius1, trackwidth1);
robot3.turnRightNB(45, radius3, trackwidth3);
for(i = 1; i <= 30; i++) {
  //plot.backgroundImage("basketballCourt.png");
  plot.circle(30 + i, 30 + i * -0.2, 2);
  delaySeconds(0.28);
}
robot3.setSpeed(6, radius3);
robot3.drivexyToNB(66, 32, radius3, trackwidth3);
robot1.setSpeed(4, radius1);
robot1.drivexyToNB(52, 34, radius1, trackwidth1);
robot2.setSpeed(3, radius2);
robot2.drivexyToNB(48, 32, radius2, trackwidth2);
robot4.turnLeftNB(45, radius4, trackwidth4);
for(i = 1; i <= 8; i++) {
  //plot.backgroundImage("basketballCourt.png");
  plot.circle(60 - i, 24 + i * 1.3, 2);
  delaySeconds(0.3);
}
robot3.drivexyToNB(64, 36, radius3, trackwidth3);
robot1.turnLeftNB(90, radius1, trackwidth1);
robot2.turnRightNB(90, radius2, trackwidth2);
for(i = 1; i <= 12; i++) {
  //plot.backgroundImage("basketballCourt.png");
  plot.circle(52 + i, 34 + i * 0.14, 2);
  delaySeconds(0.1);
}
robot1.moveWait();
robot4.moveWait();
robot2.moveWait();
robot3.moveWait();

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:
The pre-placed blocks will give you everything needed for the program. Your goal is to edit the loop of the ball in the given code to make it look like the linkbot is passing the ball to the other linkbot and the mindstorm is trying to block them.

		
Rubbish bin
Time