First Look at Digital Art

I wanted to start something, something that I can work on without the pressure of doing it well. For all you software developers out there, you know what I mean. You want to go back to a time when you developed software because you were curious and not because a customer is asking for a bug fix.

Enter generated art. I am not an artist. I don’t have an artistic bone in my body. But I can code. Art is something that has been missing in my life. I feel left out not being able to create art, or at least enjoy what I have created. So, when I discovered how easy it was to create art with code, I got excited. Oh, and I didn’t want anything difficult to learn. You know, cuz I’m getting old.

I decided to work wigh Go since that’s the language I am most comfortable with.

Googling golang generated art took me to this repository.

You want to see how easy it is to generate art? Look at these lines:

go get github.com/jdxyw/generativeart

func main() {
    rand.Seed(time.Now().Unix())
    c := generativeart.NewCanva(500, 500)
    c.SetBackground(common.White)
    c.FillBackground()
    c.SetColorSchema([]color.RGBA{
        {0xCF, 0x2B, 0x34, 0xFF},
        {0xF0, 0x8F, 0x46, 0xFF},
        {0xF0, 0xC1, 0x29, 0xFF},
        {0x19, 0x6E, 0x94, 0xFF},
        {0x35, 0x3A, 0x57, 0xFF},
    })
    c.Draw(arts.NewRandomShape(150))
    c.ToPNG("randomshape.png")
}

Yup, that’s it. And I generated something like this:

Drawing

It took, maybe, 10 minutes to get something like that. So, now I have to try out all the sample shapes. The repository is really good at hiding a lot of the implementation and get you to quickly generate art. This is all new to me.