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: (0 in, 0 in)
Current Angle: 45 deg
Wheel Radius:
Track Width:
in

Robot 2

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

Robot 3

Initial Position:
( in, in)
Initial Angle:
deg
Current Position: (0 in, 0 in)
Current Angle: 110.26 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

Pythagorean Shell
Problem Statement:
The outer perimeter of a Pythagorean spiral shell is drawn on the grid. Your job is to use the robots to finish the drawing by connect the origin to each dot on the shell's outline. The first example is done for you, driving robot 1 to the second dot at (3,3). Modify the green driveDistance() to drive robot 2 to the 3rd dot and the blue driveDistance() to drive robot 3 to the 4th dot. Finally add in more commands blocks to have robot 1 or 4 to complete the rest of the lines. Dots are numbered in counter-clockwise manner, starting at (3,0). The turning angle Θi between each dot (see initial prompt) are 45, 35.26, 30, 26.57, 24.10, 22.21, 20.71, 19.47, 18.44, 17.55, 16.78 degree counterclockwise respectively.
/* Code generated by RoboBlockly v2.0 */
#include <linkbot.h>
#include <chplot.h>
CLinkbotI robot1;
CLinkbotI robot2;
CLinkbotI robot3;
double radius1 = 1.75;
double radius2 = 1.75;
double radius3 = 1.75;
double trackwidth1 = 3.69;
CPlot plot;

robot1.traceColor("green", 3);
robot2.traceColor("green", 3);
robot3.traceColor("green", 3);
robot1.driveDistance(sqrt(9 + 9), radius1);
robot1.driveDistance(-sqrt(18), radius1);
robot2.driveDistance(sqrt(27), radius2);
robot3.driveDistance(sqrt(36), radius3);
robot1.setSpeed(20, radius1);
robot1.turnLeft(91.83, radius1, trackwidth1);
robot1.driveDistance(sqrt(45), radius1);
robot1.driveDistance(-sqrt(45), radius1);
robot1.turnLeft(24.1, radius1, trackwidth1);
robot1.driveDistance(sqrt(54), radius1);
robot1.driveDistance(-sqrt(54), radius1);
robot1.turnLeft(22.21, radius1, trackwidth1);
robot1.driveDistance(sqrt(63), radius1);
robot1.driveDistance(-sqrt(63), radius1);
robot1.turnLeft(20.71, radius1, trackwidth1);
robot1.driveDistance(sqrt(72), radius1);
robot1.driveDistance(-sqrt(72), radius1);
robot1.turnLeft(19.47, radius1, trackwidth1);
robot1.driveDistance(sqrt(81), radius1);
robot1.driveDistance(-sqrt(81), radius1);
robot1.turnLeft(18.44, radius1, trackwidth1);
robot1.driveDistance(sqrt(90), radius1);
robot1.driveDistance(-sqrt(90), radius1);
robot1.turnLeft(17.55, radius1, trackwidth1);
robot1.driveDistance(sqrt(99), radius1);
robot1.driveDistance(-sqrt(99), radius1);
robot1.turnLeft(17.55, radius1, trackwidth1);
robot1.driveDistance(sqrt(108), radius1);
robot1.driveDistance(-sqrt(108), radius1);
plot.grid(PLOT_OFF);

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, -12, 12);
plot.ticsRange(PLOT_AXIS_XY, 2);
plot.sizeRatio(1);
plot.plotting();
/* Code generated by RoboBlockly v2.0 */
#include <linkbot.h>
double i;
double s;
double a;
CLinkbotI robot;
double radius = 1.75;
double trackwidth = 3.69;

// Ignore Robots are in wrong position . This is due to double precision
robot.setSpeed(20, radius);
robot.traceColor("green", 3);
for(i = 1; i <= 11; i++) {
  s = sqrt((i + 1) * 9);
  a = rad2deg(atan(double(3)/s));
  robot.driveDistance(s, radius);
  robot.driveDistance(-s, radius);
  robot.turnLeft(a, radius, trackwidth);
}
Blocks Save Blocks Load Blocks Show Ch Save Ch Workspace
Problem Statement:
The outer perimeter of a Pythagorean spiral shell is drawn on the grid. Your job is to use the robots to finish the drawing by connect the origin to each dot on the shell's outline. The first example is done for you, driving robot 1 to the second dot at (3,3). Modify the green driveDistance() to drive robot 2 to the 3rd dot and the blue driveDistance() to drive robot 3 to the 4th dot. Finally add in more commands blocks to have robot 1 or 4 to complete the rest of the lines. Dots are numbered in counter-clockwise manner, starting at (3,0). The turning angle Θi between each dot (see initial prompt) are 45, 35.26, 30, 26.57, 24.10, 22.21, 20.71, 19.47, 18.44, 17.55, 16.78 degree counterclockwise respectively.

		
Time