In the worlds of programming and robotics, turtles are entities — either virtual or physical robots— that follow commands to move around a 2D plane. Those are usually very simple commands, such as “move forward 10 units” or “rotate 90 degrees clockwise,” and they help people learn some programming fundamentals (like Logo in the ’80s!) in an intuitive way. But a lot of complexity can evolve out of simple building blocks, as Niklas Roy proved with his turtle bots that create surprisingly intriguing emergent art.

Roy’s turtle bots are very conventional, with two wheels driven by stepper motors paired with gearboxes and controlled by Arduino Nano boards through ULN2803 driver ICs. Each turtle bot has a simple USB battery bank to supply power and a servo-actuated mechanism to move a marker up and down. As a bot drives around, it can lower its marker to draw a line.

With some pre-programmed routines, it is easy to make an individual turtle bot draw an image or pattern on a whiteboard. But when the turtle bots interact with each other or existing lines, things get interesting.

Roy created variations of the bots that can have line-erasing wipers or line-detecting photodiodes. The turtles also have bumpers with microswitches to detect collisions. With that hardware, a few simple programmed rules can result in interesting artwork when multiple bots work on the same canvas.

Each bot can follow a simple routine, like drawing a spiral, but the additional rules create variability. For example, a rule like “lift the marker when you cross an existing line” can produce depth, as Gestalt principles come into play and we interpret some art as being in the foreground versus background. 

The possible variations and interactions are endless, so the artwork that’s generated is always unique.

The post Turtle bots, Gestalt principles, and emergent art appeared first on Arduino Blog.