/* Our newly discovered mastery of repetition allows for a much nicer spriograph pattern */ #include "library.h" void square(const int side) { draw_distance(side); turn_right_by_degrees(90); draw_distance(side); turn_right_by_degrees(90); draw_distance(side); turn_right_by_degrees(90); draw_distance(side); turn_right_by_degrees(90); } void repeat_square(const int side, const int times, const double angle_change) { if (times > 0) { square(side); turn_right_by_degrees(angle_change); repeat_square(side, times - 1, angle_change); } } void main() { make_window(500,500); set_pen_color(color::red); set_pen_width(1); move_to(200, 200); repeat_square(200, 360, 1.0); }