2022-06-02 20:09:27 +08:00
|
|
|
#include <rturtle.h>
|
2021-12-03 21:36:12 +08:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
int n;
|
|
|
|
initWorld(800,600);
|
2022-06-02 20:09:27 +08:00
|
|
|
|
|
|
|
// Press F2 toggle display of grids
|
|
|
|
// Press F3 toggle display of the turtle
|
2022-06-04 18:35:37 +08:00
|
|
|
// Press F5 capture screen
|
2022-06-02 20:09:27 +08:00
|
|
|
|
|
|
|
setSpeed(500);
|
|
|
|
// setRewind(true);
|
|
|
|
// setImmediate(true);
|
2022-06-04 18:35:37 +08:00
|
|
|
setPenSize(1);
|
2021-12-03 21:36:12 +08:00
|
|
|
|
|
|
|
n=50;
|
|
|
|
for (int i=0;i<n;i++) {
|
|
|
|
for (int j=0;j<4;j++) {
|
2022-06-02 20:09:27 +08:00
|
|
|
fd(200);
|
2021-12-03 21:36:12 +08:00
|
|
|
lt(90);
|
|
|
|
}
|
|
|
|
lt(360.0/n);
|
|
|
|
}
|
2022-06-04 14:46:58 +08:00
|
|
|
waitClick();
|
2021-12-03 21:36:12 +08:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|