cormullion’s blog

View

MIT are running a new introductory course on Computational Thinking:

We use the Julia programming language to approach real-world problems in varied areas applying data analysis and computational and mathematical modeling. In this class you will learn computer science, software, algorithms, applications, and mathematics as an integrated whole.1

Teachers include Alan Edelman (co-creator of Julia), well-known Julia educator David Sanders, Grant Sanderson, and James Schloss.

And Grant Sanderson turns out to be the voice behind the famous 3blue1brown YouTube channel, with over three million subscribers. As you might imagine, I’m very keen on the visual approach he uses. I don’t always understand the maths, but the graphics are cool, and his relaxed and friendly tone makes learning as easy as it could be.

While browsing his web site I was intrigued by his logo, and the story behind it.

Out of interest, and as a sort of “Welcome to Julia!”, I thought I’d have a go at interpreting his logo in Julia. It’s a great design. After sampling the colors, the code was straightforward.

using Luxor, Colors

function drawstars(colors)
    sethue(colors[1])
    circle(O, 200, :fill)
    sethue("white")
    radii = [180, 200, 150]
    rotations = [π/28, 0, 0]
    for (n, r) in enumerate(radii)
        sethue(colors[n + 1])
        star(O, r, 28, 0.7, rotations[n], :fill)
    end
    sethue("black")
    star(O, 120, 28, 0.7, 0, :fill)
end

blues =  [
    RGB(0.455,0.753,0.89), # main
    RGB(0.322,0.557,0.639),
    RGB(0.243,0.396,0.463),
    RGB(0.133,0.298,0.357)]
browns = [
    RGB(0.549,0.384,0.224), # main
    RGB(0.459,0.298,0.141),
    RGB(0.376,0.22,0.075),
    RGB(0.259,0.129,0.043)]

@draw begin
    background("black")

    sector(O, 100, 200, π, 3π/2)
    clip()
    drawstars(browns)
    clipreset()

    sector(O, 100, 200, 3π/2, π)
    clip()
    drawstars(blues)
    clipreset()
end

giving

3b1b logo

which is a reasonable likeness for a first attempt.

New horizons

The MIT course is using Pluto.jl for exploring ideas. I like Pluto.jl a lot as well, because I share the developers’ belief that simplicity is worth striving for:

We believe that scientific computing can be a lot simpler and more accessible.

With Pluto.jl you can quickly explore the parameter space even of simple little logos like this. Here for example is a way to investigate different numbers of points for the stars:

pluto parameter

[2020-09-05]

cormullion signing off