# teaching machines

## Droplets

A year ago some students and I started designing programming languages for generating 2D vector art. I called my language Twoville, which pays homage to Seymour Papert’s metaphor of learning math in Mathland just as we learn French in France. The language is a place to learn about and forge 2D shapes. After the semester ended and the accountability dried up, I set my language aside to work on more pressing (income-generating) matters.

But the project has been gnawing on me. Every time I see an interesting logo, I consider what features are needed for me to recreate it in Twoville. For example, I was living in Brisbane, Australia, six months ago, walking regularly from our home to the Queensland University of Technology. I would pass this logo on Musk Avenue:

Daily did it haunt me. But at the time, Twoville didn’t support arcs or a facility for abstracting the droplet shape. However, I’ve just added support for functions and SVG path elements, and I can finally get this logo out of my head and into Twoville:



with viewport
center = [0, 0]
size = [20, 20]

to droplet(spin, size)
offset = 0.25

p = with path()
rgb = [1, 0.5, 0]
opacity = 1
pivot = [0, 0]
rotation = spin
closed = true

with p.jump()
position = [offset, offset]

with p.line()
position = [offset, size]

with p.arc()
direction = :counterclockwise
position = [size, offset]
center = [size, size]

droplet(0, 5)
droplet(90, 3.25)
droplet(270, 4.6)

var twovilleDiv = jQuery('#twoville_droplets');
twovilleDiv.closest('pre').replaceWith(twovilleDiv);
document.getElementById('twoville_form_droplets').submit();



Sweet relief.