Hi Guys!
At school, we have been using a programming language called Logo! It is a language with a thing called a turtle, which draws a line as it goes. This is what the program looks like:
At school we were taught to draw a perfect circle, and the code is
repeat 360 [forward 1 left 1]
or,
repeat 360 [fd 1 lt 1]
as the abbreviated version.
This is what it looks like:
I decided to try and make a spirograph with it, and after a lot of trial and error code, I finally cracked it.
The overall code looks like this:
to minispir
repeat 60 [
repeat 360 [fd 1 rt 1]
pu fd 6
pd lt 6
]
end
The pu and pd command raise and lower the pen off the paper. The final item looks like this:
I thought it needed a bit more, so I made it much bigger and here is the code:
to spir
repeat 10[
pu fd 36
pd rt 36
repeat 60 [
repeat 360 [fd 1 rt 1]
pu fd 6
pd lt 6
]]
end
the final thing looks like this;
And that is the finished product! If any of you want more info, visit here:
or here:
See Ya!
Hi Matthew! I remember programming in Logo when I was at school. I never made anything as cool as your spirograph, though.
ReplyDelete