How to Draw a Chessboard in LOGO?

Words
101
Reading
1 min
Listen
Play
8y

turtlegraphics@turtlegraphics aims to provide a set of simple-to-follow-and-fun-to-learn examples for Logo Programming, which is known as Turtle Graphics for both parents and kids!.

Logo Programming Source

TO FK :B
  HT # hide the turtle
  IF :B>15 [STOP]
  REPEAT 4 [FD :B RT 90]
  FK :B+1 # draw a bigger square to fill
END

TO QP :Y
  IF :Y>4 [STOP]
  REPEAT 4 [FK 15 FD 15 FK 1 FD 15]
  RT 90 FD 30 RT 90
  REPEAT 4 [FK 15 FD 15 FK 1 FD 15]
  RT 180
  QP :Y+1
END

QP 1

Procedure FK draws a solid square by recursively drawing a smaller square in it. The Chessboard is then drawn by recursively drawing interleaving squares.

Screenshot

image.png

Logo Software

https://chrome.google.com/webstore/detail/logo-turtle/dcoeaobaokbccdcnadncifmconllpihp

If you like this idea and update...

turtlegraphics@turtlegraphics and the LogoTurtle is maintained by justyy@justyy

Support him and his work as a witness by

  1. voting him here, or
  2. voting him as a proxy

Some of his contributions: SteemIt Tools, Bots, APIs and Tutorial Thank you!

How to Draw a Chessboard in LOGO? | Ecency