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: |
![]() |
|
|
|
|
|
|
|
|
|
/* Code generated by RoboBlockly v1.3 */ #include <chplot.h> double angle; double x; double y; double count; double i; CPlot plot; angle = 45; x = 5; y = 5; count = 0; plot.strokeColor("orange"); plot.fillColor("orange"); plot.circle(0, 0, 2); for(i = 0; i <= 16; i++) { if (i == count) { count = count + 2; plot.strokeColor("#cc66cc"); plot.fillColor("#cc66cc"); plot.ellipse(x, y, 10, 4, angle); delaySeconds(1); } angle = angle + 22.5; x = 7 * cos(deg2rad(angle)); y = 7 * sin(deg2rad(angle)); } plot.axisRange(PLOT_AXIS_XY, -12, 12); plot.ticsRange(PLOT_AXIS_XY, 2); plot.sizeRatio(1); plot.plotting();
Problem Statement: Using a loop function, create a flower centered at the origin, with 8 petals. Each petal should have a height of 10 inches. Make each petal appears 1 second after the petal to the right of it. The center circle and the first petal are already done for you. |
|||||||||||
|
|||||||||||