Turtle

Turtles-3

Turtle 3 - Turtles in Time (1980s-Present)

By the end of the 1970s computers had gotten somewhat smaller, and a lot of little companies were sprouting up.

In 1978 and 1979, Wally Feurzeig, Seymour Papert, and Cynthia Solomon and some other associates know as the Logo Group helped implemented Logo for Texas Instruments, creating the first graphic calculators.

They started Logo Computer Systems to help popularize the language, and they worked with a few companies to bring Turtle to the masses.

We're going to start with one you might know: Apple.

Part of Apple's early goals were expanding computers in the classroom and so they needed educational software.

One of the most popular pieces of software for schools was Apple Logo

Throughout the 80s, schools were given Apple IIs at a steep discount, and kids across the world started to play with Turtles.

That's actually where I enter the picture.

As a kid of about 5 years old, I started running into Apple II computers at school, and when I got the chance, I played with Turtles.

I didn't really think too much of it at the time.

I certainly didn't think of it as anything like programming until fairly recently.

Looking back, it's clear that this is where I first felt the spark of creative inspiration that programming can bring.

I was not the only person inspired by playing with Turtles.

Let's see some of Turtle's influence in time.

Turtles in Typography (1980s-Present)

It also inspired some people working on printers and fonts, specifically, John Warnock.

To make a long story fairly short, all digital typefaces are vector graphics, scaled to a font size.

So every character you have read in this history of Turtles is, in fact, a turtle.

To blown your mind a bit further, each character lives in a box called the em square. EM squares are usually 2048 points wide.

So, each character has roughly have the 'resolution' of the screen it lives in.

Each glyph is a turtle with a pen, drawing a series of lines and curves.

This makes glyphs small and scalable.

It also makes every letter in every digital alphabet a turtle.

Turtles in HTML (1990s-Present)

In addition to fonts, Turtle's influence was also clearly felt throughout early web development and in vector graphics.

In order to draw any text, a browser had to think like a turtle, character by character.

The browser is built up from the concepts in a typographic turtle.

Each tag is effectively the name of a type of turtle, containing a bunch of a text that are really nested turtles.

In 1999 the web standards solidified SVG, which formalized how vector graphics were described within a website.

At the heart of SVG are Paths, which represent a small set of absolute or relative moves.

Every site you visit is Turtles all the way down.

Turtle Illustrations (1985-Present)

John Warnock brought turtles into every typeface. They also brought turtles into everyday illustration.

In 1985, Adobe Illustrator was first released.

Illustrator is a vector graphics illustration tool that is still widely popular, and just like the typefaces Adobe Postscript pioneered, illustrator was built upon turtles.

It's primary competitor Corel Draw came out a few years later. It also started with vector graphics, and presumably, a healthy amount of understanding of turtles.

Turtles in 3D (1980-Present)

Turtles can work with any number of coordinates, and 3D turtles have extisted since at least 1980.

They are discussed in detail in the wonderful book Turtle Geometry, by Hal_Abelson and Andrea diSessa.

These concepts helped create some of the first 3D computer graphics, and this field has come a long way since Tron.

One could argue that all computer generated images and all computer aided designs are descended from Turtles.

Around the same time, manufacuters began to experiment 3D printing.

If you hooked up an extruder to a Turtle, instead of a pen, you could theoretically make things using less waste material.

3D Printers are, like all CNC machines, descendents of the first generation of Turtles. The primary difference is that a 3D printer addi

The extruder is a turtle, and, instead of drawing with a pen, you draw by extruding plastic.

With the explosive growth of 3d printers after the popularization of RepRap, millions more people started to play with Turtles (even if they weren't realizing it).

Python Turtles (2006-Present)

In 2006, someone named Gregor Lingl started making Turtle for Python.

(I wish I knew more about this person and what inspired them. If you do, please reach out.)

Python Turtle got pretty popular over the years.

It's now become a core part of of Python, and Python turtle examples are everywhere. There's even on online sandbox!

Python turtle helped bring a new generation of people to turtle, and has generated some great visualizations over the years.

It helped remind the computing community about Turtle, and that inspiration spread to other languages and mediums.

TurtleStitch (2015-Present)

One of the projects to come out of the third generation of Turtles is TurtleStitch.

This was developed by Andrea Mayr-Stalder, Michael Aschauer, and Tina Hochkogler, with help from the open source community.

As the name implies, it allows you to create Turtle graphics embroidery.

Not only has this helped another generation of people understand Turtles, it has also helped revolutionize the embroidery field.

Even better than that, Cynthia Solomon started using TurtleStitch, and brought an amazing number of Turtle designs into embroidery form.

One Laptop Per Child (2005-2014)

The One Laptop Per Child project was designed to help children all around the world learn more through cheap and easy access to technology.

Each laptop included a Turtle Graphics engine that any child could control with a touchscreen.

One Laptop Per Child was explicitly influenced by the work of Seymour Papert.

The hope was that by providing computer access from an early age, children could achieve full digital literacy.

Three million laptops were shipped all across the world in the One Laptop Per Child program.

I am pretty darn sure that many of those children will have brighter futures due to early exposure to programming.

Turtle has been an inspiration to millions of people for generations, and should inspire people for decades to come.

Turtles in a PowerShell (2006-Present)

Speaking of people inspired by Turtle and Logo, let me tell you a bit about PowerShell.

PowerShell is a scripting language and shell made by Microsoft and first released in 2006.

It has been open source and cross-platform since 2016.

PowerShell was made to be easy to understand and close to natural language.

It was built by some particularly smart people, including:

These people are "old hats" of technology, and know quite a bit about the history of computing (some of them even had front-row seats).

The list of smart people could go on; I'm quite sure I'm leaving out many gifted colleagues.

In case this isn't quite clear, this is where I come back into the story.

Between 2000-2004, I built realtime video graphics system for performance purposes.

I had been doing concert and nightclub video and lighting, and ended up making video manipulation software.

I learned how to program pixels and I had my first taste of building scripting languages.

In 2006, I joined the PowerShell team at Microsoft.

This will probably be the best job of my life, and the most impactful job I have ever had.

The language was built by a number of bright minds with a keen sense of computing history.

All of these people were deeply inspiring, and had been inspired by the previous decades of computing.

Working with a lot of "old hats" brought out a lot of old stories.

I don't quite remember who first suggested someone build a turtle in PowerShell, but I think Lee Holmes was the first to put something out into the public.

People often seemed to presume PowerShell could only live inside of a terminal, and could not be used to build GUIs.

This was a perception Jeffrey Snover and I set out to change.

Thus I ended up on a more quixotic journey, building out some of the first PowerShell GUIs (in WPF, Winforms, and Web).

That's where I first ran into SVG Paths, and started to slowly learn about constructing shapes from scratch.

It took me a very long time to realize I was playing with Turtles again.

A few years ago (~2022), I made a wrapper for SVG in PowerShell - PSSVG

This brought me back to constructing paths, and really helped me fall in love with the format.

SVG can be rendered inside of any page, because SVG is HTML.

To generate a webpage with rich graphics in PowerShell, we just generate a series of strings with some SVG.

This opened the door to infinite vector graphics PowerShell, but it didn't make it "easy".

It was hard to imagine the path to draw and describe it in short syntax.

To make it easy, I had to start thinking like a Turtle.

Then things really started to "click".

Eureka! It's Turtles!

The first "click" was realizing that a Turtle's movement was really just a Polar Coordinate.

The second "click" was realizing that SVG paths could be relative, and thus I could express a Turtle's movements thru a series of steps.

The third "click" was that a turtle could be any object, as long as it had a heading, a pen, and steps.

These clicks came quickly, and within a few minutes I had whipped up a really basic Turtle in a script.

Here's a quick example of building a Turtle in PowerShell from scratch:

# Define our custom object 
$turtle = [PSCustomObject]@{
    Heading = 0.0
    Steps = @()
    PenDown = $true
}

# Add a Rotate and Forward method, and a PathData script property
$turtle | 
    Add-Member ScriptMethod Rotate {
        param([double]$Angle)
        $this.Heading += $angle
        return $this
    } -Force -PassThru |
    Add-Member ScriptMethod Forward {
        param([double]$Distance)
        $x = $Distance * [math]::cos($this.Heading * [Math]::PI / 180)
        $y = $Distance * [math]::sin($this.Heading * [Math]::PI / 180)
        $letter = if ($this.PenDown) { "l" } else {"m" }
        $this.Steps += "$letter $x $y"
        return $this
    } -Force -PassThru |
    Add-Member ScriptProperty PathData {
        return "m 0 0 $($this.Steps)"
    }
    
        
# Make a basic triangle 
$turtle.
    Forward(42).Rotate(120).
    Forward(42).Rotate(120).
    Forward(42).Rotate(120)

# Put our path data into an XML
$svg = [xml]"<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 42 42' width='100%' height='100%'>
    <path d='$($turtle.PathData)' />
</svg>"

# Save it to a file
$svg.Save("$pwd/Triangle.svg")

Not only is this remarkably short, it also shows how simple it is to implement Turtle in any language.

This is especially interesting when we think about a Turtle in PowerShell.

Because PowerShell objects are so flexible, we can store all the information about our Turtle as a PowerShell object and translate it to other languages at the last second.

Once the dots had connected, I set to work making a PowerShell module for Turtle and learning all I could on the topic.

So far, I can confirm a few things:

  1. Turtle Graphics are Fun!
  2. There's lots of Turtle Power!
  3. The Modern World Is Turtles All The Way Down

Please, explore this site and share your thoughts and feedback.