Tuesday, February 9, 2016

Programming Valentines Day Cards

Instead of buying Valentines Day cards for my four year old's classmates, he and I decided to program the LogoTurtle to help make designs for cards that we would create. I checked with one of his teachers to make sure this did not come as being cheapskate: she said she loved the LogoTurtle and still had one of the pieces I created with it with some of my son's classmates.

I oftentimes use TurtleArt to plan my LogoTurtle procedures: it helps to be able to visualize the design before I type the procedure. I asked him what he wanted on the cards. He chose a heart. My son watched me snap the blocks together and made suggestions about how long the lines needed to be and how they needed to meet the arcs at the top.

Designs do not always transfer perfectly from TurtleArt to the LogoTurtle: the Metro Mini does not handle floating point math, so some tricky math was employed for the arcs, for example, and the friction of the pen, wheels, and ball bearing on the paper all affect the drawing. Regardless, it did not take too many changes to the TurtleArt procedure for it to run well on the LogoTurtle.

Using a 5 inch by 8 inch index card, the LogoTurtle drew two hearts per page. 

When my son returned from school he got coloring!

The variety is lovely!

This project is another example of going from bits to atoms with Logo programming. Additionally, it is another chance for me to instill in my son the belief that creating, not consuming, produces more memorable, personal, and beautiful work.

Sunday, February 7, 2016

Another Wind Tube Bird Design

When I play with the Wind Tube I quickly challenge myself to some type of goal, typically sustained flight in the Wind Tube. My four year old appreciates things shooting out of the top of the tube, with the exception of a long ribbon, which he has figured out how to hook to the base so it flutters in the tube.

We mucked around with our own designs and challenges this weekend. I was inspired by Todd Burleson's work with his students using ping pong balls and practice golf balls. While too heavy to achieve flight on their own, they can be incorporated into models to act as ballast.

Here is another bird design I quickly put together.

I added a second "leg" to increase the weight a bit to keep it flying in the wind tube.

I left the room and came back several minutes later and this bird was still happily circling in the wind tube! A successful design!

LogoTurtle Trees

I was so taken by the earlier tree design that I adapted another of Michael Friendly's Logo procedures to the LogoTurtle, this time one that uses some randomness to create a much more organic looking tree that renders differently each time the turtle draws it.
to random.tree :l :a :depth
if :depth = 0 [stop]
let [len random 0 :l]

let [ang random 0 :a]
fd :len
lt :ang fd :len
random.tree :l :a (:depth - 1)
bk :len rt 2 * :ang fd :len
random.tree :l :a (:depth - 1)
bk :len lt :ang
bk :len
I created trees and their roots for each season. The spring buds, summer foliage, and fall plumage all are different procedures. I adapted Erik Nauman's awesome generative arcs procedure for the fall leaves.

 Tree 1 (Winter)

Tree 2 (Spring)

Tree 3 (Summer)

Tree 4 (Fall)

I am really happy with the way the series turned out. There is a beautiful level of abstraction in how the trees are drawn, and I love the variety of foliage procedures I programmed. 

Contact me if you are interested in purchasing your own version of one of the trees: Seymour the floor turtle would be happy to draw you one.

Tuesday, January 26, 2016

LogoTurtle Fractal Designs

I was inspired by Erik Nauman's Generative Art and the LogoTurtle post and decided to program some fractal art for the LogoTurtle to draw.

First, I reached out to Erik for a little assistance adapting my TurtleArt Dragon Curve procedure to LogoTurtle. He and Brian helped me by building a little random number generator that helps determine whether the LogoTurtle turns right or left 90 degrees.

to dragon.curve
repeat 100 [
fd 50
ifelse (random 0 10) < 5
[rt 90]
[lt 90]
This procedure calls for repeating many times or even looping infinitely. The only limitation is the amount of ink in the pen and the size of your canvas!

The next procedure was adapted from Michael Friendly's Advanced Logo. I have been wanting to understand and create a tree pattern like this for some time: this exercise put me on that path.

to tree2 :len :depth :ang
if :depth = 0 [stop]
lt :ang fd :len
tree2 :len (:depth - 1) :ang
bk :len rt 2 * :ang
fd :len
tree2 :len (:depth - 1) :ang
bk :len lt :ang
 First, I ran it small with the following procedure:
rt 60 
rt 60 
back 100 
repeat 3 [tree2 20 5 12 lt 60] 

The design is surprisingly organic and beautiful. The trunk is not quite right, though.

The next time I ran it I sized it up considerably:
to startup
wait 1000
rt 60
repeat 3 [
tree2 100 5 12 lt 60]
rt 120
bk 100

It was also beautiful.

LogoTurtle, like elsewhere, proves to be a fun and beautiful place to examine fractals and mathematics.

Sunday, January 17, 2016

Mint Tin Drawdio

For the discerning Drawdio player on the go, I offer the Mint Tin Drawdio. Built on an Adafruit Mint Tin protoboard, this Drawdio is just as loud as my previous cigar box housed version but packs portability, loudness, and urban styling into a sleek package.

This was my first project using a protoboard, and I have to say I loved it. My soldering skills are improving with each project. Some of the connections probably warranted a finer-tipped soldering iron than I was using, but everything worked out. I have learned the skill of heating the elements I wish to solder and being skimpy with the amount of solder I use: a little goes a long way.

I remixed a design from Thingiverse to create a 3D printed bumper to insulate the components on the protoboard from the tin.

With all the parts in place, I drilled holes for 8mm M3 hex head bolts to hold the bumper and protoboard in the tin. I also drilled holes for the power wires and the contact wires. I used a pair of snips to cut a slit in the front of the tin and bent it back to allow the speaker wires a route out of the tin.

@zackboston gave me the awesome Altoid tin, decorated by students at the South End Technology Center.

This Drawdio can easily be slipped into a pocket or even incorporated into my sport coat!

I wanted to protect the speaker from being damaged while it was out in the world. I used one of the Turtle Block designs from my Sunflower project to make a grille, then built a housing as well. The grille and lid press-fit together perfectly.

Finally, I designed a bracket that holds the battery and the speaker. The bracket attaches to the rear of the mint tin by means of three press-fit rare earth magnets. Both the battery and speaker can be removed from the bracket for jamming out.