C4In progress

Code, creatively.

C4 is an open-source framework built to make creative coding easy for designers.1 I built it to put Core Animation's layers, animation and touch behind a few lines of code.

Project facts

Role
Creator and primary developer
Years
2010 on; iOS from 20121
Team
Me, with Alejandro Isaza from 20143
Built
Objective-C, then Swift, on Core Animation and UIKit
Learning
A 25-chapter course and 200+ examples4
Taught
ACAD, OCAD, NYU ITP, TEI and Resonate5
Licence
MIT, on GitHub2
Funding
An ACAD fellowship and an AACTI grant6

25

chapters in COSMOS, from the first sketch to the App Store.4

200+

examples, across the Objective-C and Swift versions.4

973

stars on GitHub, as of October 2026.2

The problem

The tools redrew everything, every frame.

Artists and designers made interactive work in Processing and openFrameworks. Both redrew the whole screen 30 or 60 times a second, whether anything changed or not, and projects, mine and others', overloaded. Neither had a native system for clicks, touches or gestures.

A Processing window titled StoringInput: a trail of white circles on dark grey, shrinking behind the mouse.

Processing's Storing Input example. Every frame, it paints the background and all 60 circles again.

What I owned

What I did, and what others did.

Where it came from

Every foundation under C4 was found while building TypeIs.

In Banff, in the Rockies, I built TypeIs, software for drawing with type. For it I moved to Objective-C and Core Text, and found that the Mac only redraws the parts of the screen that change. Core Animation sat underneath, and no creative-coding tool exposed it. In 2010 I rebuilt the ideas of Processing and openFrameworks on top of it, on the Mac, and called it Cocoa for Artists.1

A grid of 28 small sketches made with Cocoa for Artists: shapes, gradients, lines, type and the C4 logo, mostly black and white.

Examples from Cocoa for Artists, the Mac version, 2011.

The solution

Describe each change once. Core Animation plays it.

C4 had no draw loop. Each shape was a layer on screen. You changed its properties inside an animation block, and Core Animation played the change, redrawing only what moved. Touch, gestures, images and movies were objects that worked the same way.

The same sketch in C4. Each circle got one animation, and was removed when it finished.

override func setup() {
    canvas.addPanGestureRecognizer { locations, center, translation, velocity, state in
        ShapeLayer.disableActions = true
        let circle = Circle(center: center, radius: 30)
        self.canvas.add(circle)
        ShapeLayer.disableActions = false

        let a = ViewAnimation(duration: 1.0) {
            circle.opacity = 0.0
            circle.transform.scale(0.01, 0.01)
        }
        a.addCompletionObserver {
            circle.removeFromSuperview()
        }
        a.curve = .Linear
        a.animate()
    }
}
Storing Input, in C4. From my 2016 tutorial comparing Processing and C4.
A blue twenty-point star beside a blue hexagon, on white.
A sine wave drawn as a thick blue line on white.
The letters C4 in pink Helvetica on white.

Stars, polygons, arcs, curves and paths were all shapes, set up in one line each.

One ViewAnimation block animated a stroke's start and end, with repeats and reverses.

A pan gesture handed over every finger's location, ready to reshape a path.

Math functions came with the framework, drawn here as a curve.

A font and a string made a shape that could be filled, stroked and animated.

Underneath

Tough calls

We cut the Mac version that night.

A guy in a cowboy hat pulled out an iPhone in a bar in midwinter. My friend said even he had an iOS device. I started the iOS version in February 2012,1 and left 3D out: C4 worked only with Core Animation's 2D and pseudo-2D layers.

Shapes morphing on an iPad, 2012.

@implementation C4WorkSpace {
    C4Shape *s1, *s2;
}

-(void)setup {
    s1 = [C4Shape ellipse:CGRectMake(0, 0, 100, 100)];
    [self.canvas addShape:s1];
}

-(void)touchesBegan {
    s1.animationDuration = 2.0f;
    s1.animationOptions = EASEOUT;
    s1.backgroundColor = C4GREY;
    s1.center = self.canvas.center;
}

@end
C4 in Objective-C, July 2012. Give a shape a duration, change it, and it animates.
The decision to solely target a single, closed platform may seem like a limitation at first, but this hyper-focus on iDevices could prove to be a benefit, enabling C4 to do one thing and do it right.Harrison Weber, The Next Web, 20127

The rewrite

Rewritten in Swift, then taught from start to finish.

In September 2014 Alejandro Isaza restarted the code as a blank Swift project, and led the move. I rewrote it with him. Swift's closures made the API smoother, and nothing was lost. C4 1.0 came out in July 2015.3 Then I wrote COSMOS, a 25-chapter course that designs, builds and publishes an app to the App Store, with 110 examples beside it.4

COSMOS's radial menu separated into its layers, floating in a stack: a grey base, the rings and a blue highlight.

COSMOS's radial menu, separated into its layers. From chapter 15 of the course.

The impact

Tons of people learned on it.

I led many creative coding workshops over the years. I taught it in Calgary from 2010, at NYU's ITP, at TEI in Barcelona and at Resonate in Belgrade, and taught Programming for Artists with it at ACAD. Adam Tindale taught it at OCAD.5 Greg Debicki wrote 125 examples for it in 2013. I built installations and client apps with it.

The outcome

My artwork, then SAP, then Logic&Form, then Flow.

The work I made with C4 brought the SAP contracts, then my studio, then Flow. Flow began in 2015 as C4 Studio, an interface around C4's API, for designers who didn't want to program.

25

chapters in COSMOS, from the first sketch to the App Store.4

200+

examples, across the Objective-C and Swift versions.4

973

stars on GitHub, as of October 2026.2

C4 Studio, the tool that became Flow, in August 2017.

  • Logic&Form.

    Building with C4 led to the design studio I opened, which made installations and apps.

  • The Canada Media Fund.

    Its grant behind Flow was won on my C4 work.8

  • Flow.

    We planned to build it on C4, then built a new animation framework on the same principles.

  • Automata.

    In 2024 I dug it out, got it running, and made new work with it. The first Automata series came out of C4.

My take

Questions? Answers.

  • Is it still available?

    Yes. The code is public on GitHub under the MIT licence. The last release, 3.0.1, came out in October 2017, for the Swift and Xcode of that time.2

  • Who built it?

    I created it and wrote most of it. Alejandro Isaza led the move to Swift from 2014. The footnotes name everyone else.3

  • Why iOS only?

    The Mac version came first, in 2010. By 2012 people carried iPhones everywhere, and touch was native there, so I cut the Mac version and kept iOS.

  • Was Flow built on C4?

    No. We planned to, then built a new animation framework on the same principles. Flow began in 2015 as C4 Studio.

  • How was it funded?

    With grants and my own time. An ACAD fellowship funded its production in 2012, and an AACTI grant through ACAD paid for examples, tutorials and the website.6

  • Do you still use it?

    I did in December 2024 and 2025. I got it running again and made the first Automata series with it. Automata moved to a Metal engine in 2026, when it needed to make far more images.

Next project

Logic&Form.

My interactive studio in Vancouver.

  1. C4 began on the Mac as Cocoa for Artists in 2010. The iOS version's first commit is dated 17 February 2012.
  2. github.com/C4Labs/C4iOS, MIT licence: 973 stars, 74 forks and 1,053 commits on the main branch, as of 19 October 2026. The last release, 3.0.1, is dated 14 October 2017. C4Labs holds six public repositories.
  3. From the C4iOS history on GitHub. My commits appear under several names (Travis, Travis Kirton, -- C4 --, C4Framework): 828 of 1,053. Alejandro Isaza made 170, from June 2014. The Swift version began with his commit "Restart from a blank Swift project" on 30 September 2014; C4 1.0.0 was tagged on 12 July 2015. Others on C4: Alejandro Isaza restarted the code in Swift in 2014, wrote its first core and led its engineering. Greg Debicki wrote 125 examples and 20 tutorials for the Objective-C version in 2013. Jayme Cochrane built the 2016 c4ios.com site. Kurtis Lesick and ACAD's CE3C lab helped get the project going. Adam Tindale taught C4 at OCAD. Twelve other people sent fixes and additions on GitHub. The TEI 2013 paper on C4: Travis Kirton, Sebastian Boring, Dominikus Baur, Lindsay MacDonald and Sheelagh Carpendale, "C4: a creative-coding API for media, interaction and animation", TEI 2013, ACM, pages 279 to 286.
  4. The Objective-C version had 215 examples and 30 tutorials by December 2013; Greg Debicki wrote 125 of those examples and 20 of the tutorials that year. The Swift version had 110 examples, 9 tutorials and the 25 chapters of COSMOS in 2016. Sources: c4ios.com in 2013 (Wayback Machine) and its 2016 source.
  5. Workshops: Cocoa for Artists (four weeks, Calgary, 2010), Factory C4A (five weeks, Calgary, 2011), about 35 Media Arts and Digital Technologies students at ACAD (March 2012), a C4 summer residency at ACAD (2012), NYU ITP (three days, 2013), Vivo Media Arts (two weeks, Vancouver, 2013), TEI 2013 (Barcelona) and Resonate (a week, Belgrade, 2016). Course: Programming for Artists, ACAD, autumn 2012. Talks: Resonate 2014 and 2016, Vancocoa 2014. Adam Tindale taught C4 at OCAD.
  6. An ACAD fellowship funded the production of C4 during my 2012 residency at the Alberta College of Art + Design. An AACTI grant through ACAD paid for examples, tutorials and the website.
  7. Harrison Weber, "C4: This creative coding framework was made just for iOS", The Next Web, 30 September 2012.
  8. See Flow: about $1.75M CAD, three quarters from a Canada Media Fund grant won on my earlier C4 work.

Examples and loops shown were made in C4. The Processing sketch is from processing.org's examples. Resonate 2014 photo: Luka Knežević-Strika. Halo photo: Tangible Interaction. Airport installation: Ars Electronica Futurelab.