RedPanda-CPP/platform/linux/templates/CL_Turtle/CL_Turtle_cpp.txt

27 lines
387 B
Plaintext
Raw Normal View History

2022-06-04 18:25:58 +08:00
#include <rturtle.h>
int main() {
int n;
initWorld(800,600);
// 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-04 18:25:58 +08:00
setSpeed(500);
// setRewind(true);
// setImmediate(true);
2022-06-04 18:35:37 +08:00
setPenSize(1);
2022-06-04 18:25:58 +08:00
n=50;
for (int i=0;i<n;i++) {
for (int j=0;j<4;j++) {
fd(200);
lt(90);
}
lt(360.0/n);
}
waitClick();
return 0;
}