Dec 082019
- Start a new project in LOGO
- Copy this code (copy and paste)
reset
setpensize 5
to rect :h :w :x :y
pu setxy :x :y pd
repeat 2 [fd :h rt 90 fd :w rt 90]
end
- Now you can draw any size rectangle anywhere on the page by typing:
- rect 30 60 100 -50
- The first two numbers and the height and width
- The second two numbers are the x-coordinate and y-coordinate
- The page goes from
- -250 to 250 left to right
- -250 to 250 bottom to top
- The page goes from
- MAke a picture out of rectnangles
- ** Add a colour variable to the procedure
- ** Add another variable, eg
- pensize
- angle (dn’t forget to change the angle back again)
- make it a parallelogram (one angle :ang, other angle (180 – :ang) )