The Box Function in Logo

Words
122
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 Draw a Box

You can visualize a Box by using this:

to box :a :b :c :d
   pu setxy :a :b pd
   repeat 2 [fd :d-:b rt 90 fd :c-:a rt 90]
end

The idea is to move to a lower left corner and draw a rectangle by moving the turtle. You can compute the steps from two coordinates

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 (witness thread) by

  1. voting him here, or
  2. voting him as a proxy i.e. justyy@justyy represents you (has your votes).

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

The Box Function in Logo | Ecency