A Trivial Square

#include "library.h"

void draw_a_square(int size)
{ draw_relative(size, 0);
  draw_relative(0, size);
  draw_relative(-size, 0);
  draw_relative(0, -size); }

void main()
{ make_window(400, 400);
  set_pen_width(3);
  set_pen_color(color::red);
  move_to(100, 100);
  draw_a_square(200); }


Five Squares Arranged

#include "library.h"

void draw_a_square(int size)
{ draw_relative(size, 0);
  draw_relative(0, size);
  draw_relative(-size, 0);
  draw_relative(0, -size); }

void draw_pattern_of_five(int width)
{ draw_a_square(3*width/7);
  move_relative(4*width/7, 0);
  draw_a_square(3*width/7);
  move_relative(0, 4*width/7);
  draw_a_square(3*width/7);
  move_relative(-4*width/7, 0);
  draw_a_square(3*width/7);
  move_relative(0, -4*width/7);
  move_relative(2*width/7, 2*width/7);
  draw_a_square(3*width/7);
  move_relative(-2*width/7, -2*width/7); }

void main()
{ make_window(400, 400);
  set_pen_width(3);
  set_pen_color(color::red);
  move_to(100, 100);
  draw_pattern_of_five(200); }


Twenty-Five Squares Arranged

#include "library.h"

void draw_a_square(int size)
{ draw_relative(size, 0);
  draw_relative(0, size);
  draw_relative(-size, 0);
  draw_relative(0, -size); }

void draw_pattern_of_five(int width)
{ draw_a_square(3*width/7);
  move_relative(4*width/7, 0);
  draw_a_square(3*width/7);
  move_relative(0, 4*width/7);
  draw_a_square(3*width/7);
  move_relative(-4*width/7, 0);
  draw_a_square(3*width/7);
  move_relative(0, -4*width/7);
  move_relative(2*width/7, 2*width/7);
  draw_a_square(3*width/7);
  move_relative(-2*width/7, -2*width/7); }

void draw_pattern_of_twenty_five(int width)
{ draw_pattern_of_five(3*width/7);
  move_relative(4*width/7, 0);
  draw_pattern_of_five(3*width/7);
  move_relative(0, 4*width/7);
  draw_pattern_of_five(3*width/7);
  move_relative(-4*width/7, 0);
  draw_pattern_of_five(3*width/7);
  move_relative(0, -4*width/7);
  move_relative(2*width/7, 2*width/7);
  draw_pattern_of_five(3*width/7);
  move_relative(-2*width/7, -2*width/7); }

void main()
{ make_window(400, 400);
  set_pen_width(3);
  set_pen_color(color::red);
  move_to(50, 50);
  draw_pattern_of_twenty_five(300); }


Lots of Squares Arranged

#include "library.h"

void draw_a_square(int size)
{ draw_relative(size, 0);
  draw_relative(0, size);
  draw_relative(-size, 0);
  draw_relative(0, -size); }

void draw_pattern_of_five(int width)
{ draw_a_square(3*width/7);
  move_relative(4*width/7, 0);
  draw_a_square(3*width/7);
  move_relative(0, 4*width/7);
  draw_a_square(3*width/7);
  move_relative(-4*width/7, 0);
  draw_a_square(3*width/7);
  move_relative(0, -4*width/7);
  move_relative(2*width/7, 2*width/7);
  draw_a_square(3*width/7);
  move_relative(-2*width/7, -2*width/7); }

void draw_pattern_of_twenty_five(int width)
{ draw_pattern_of_five(3*width/7);
  move_relative(4*width/7, 0);
  draw_pattern_of_five(3*width/7);
  move_relative(0, 4*width/7);
  draw_pattern_of_five(3*width/7);
  move_relative(-4*width/7, 0);
  draw_pattern_of_five(3*width/7);
  move_relative(0, -4*width/7);
  move_relative(2*width/7, 2*width/7);
  draw_pattern_of_five(3*width/7);
  move_relative(-2*width/7, -2*width/7); }

void draw_pattern_of_one_twenty_five(int width)
{ draw_pattern_of_twenty_five(3*width/7);
  move_relative(4*width/7, 0);
  draw_pattern_of_twenty_five(3*width/7);
  move_relative(0, 4*width/7);
  draw_pattern_of_twenty_five(3*width/7);
  move_relative(-4*width/7, 0);
  draw_pattern_of_twenty_five(3*width/7);
  move_relative(0, -4*width/7);
  move_relative(2*width/7, 2*width/7);
  draw_pattern_of_twenty_five(3*width/7);
  move_relative(-2*width/7, -2*width/7); }

void main()
{ make_window(400, 400);
  set_pen_width(2);
  set_pen_color(color::red);
  move_to(20, 20);
  draw_pattern_of_one_twenty_five(360); }


This could go on for a long time