How to Grow a Painting With Generative Art

Evolvotron

What if you could plant a “seed”, and grow a painting? Surely that would save the artist a lot of trouble learning pesky things like how to draw.

As it turns out, such a thing is possible. Computer generated artwork is nothing new. Who could forget Dire Straits’ Money for Nothing?

And, of course, my own blog gallery is full of digital artwork.

But with digital painting and drawing, the computer is simply another tool, like a paintbrush or charcoal stick, used to create an image.

I’m proposing we step away from that, and let the computer take the creative reins.

It’s an application of genetic programming.

If you’ve never heard of genetic algorithms and evolutionary programming, the idea is to apply the concepts of evolution and “survival of the fittest” to solve problems in mathematics and computer science.

To solve a problem, you consider potential solutions to be “organisms.” As organisms, solutions mate and produce offspring. “Organisms” which represent better solutions are given a higher chance of mating. After several generations, you should have a fairly good set of solutions.

A classic example of an application would be the traveling librarian problem.

Suppose your local librarian had to deliver books to all five of her branches. In which order should she visit the cities so that she travels the fewest miles?

[iframe width=”425″ height=”350″ frameborder=”0″ scrolling=”no” marginheight=”0″ marginwidth=”0″ src=”https://maps.google.com/maps?f=d&source=s_d&saddr=Kenansville,+NC&daddr=warsaw+library,+warsaw+nc+to:Faison+Library,+Park+Circle,+Faison,+NC+to:Phillip+Leff+Memorial+Library,+Phillip+Leff+Memorial+Library,+807+E+Broad+St,+Beulaville,+NC+28518+to:Rose+Hill+Community+Library,+Rose+Hill+Community+Library,+113+S+Walnut+St,+Rose+Hill,+NC+28458+to:Magnolia+Florence+Gallier,+Magnolia+Florence+Gallier,+104+W+Main+St,+Magnolia,+NC+28453&hl=en&geocode=FdR7FQIdIWRa-ynZ7fq90d-riTFtuJB7JssBxw%3BFaEKFgId0WdY-yFvJx4dp4AiVik1-E8T6ueriTFvJx4dp4AiVg%3BFb_bFwIdYrBX-yHmR_hSKjzyhClB6TpToe-riTHmR_hSKjzyhA%3BFbfaFAIdXmRd-ykV2RVUwGepiTEN_JI5aqu77w%3BFelmEwIdEn5Z-ynxNa4UJ9qriTERXAJmmhnHQQ%3BFaR5FAIdYfZY-ylf62HwetyriTEk35vlsXboSQ&aq=&sll=34.925349,-78.043442&sspn=0.441376,0.619354&gl=us&mra=pd&ie=UTF8&t=m&ll=34.957995,-77.97821&spn=0.393929,0.583649&z=10&output=embed”][/iframe]
View Larger Map

In this example, the solution is represented as the permutation of five towns

Solution 1 “gene” = { Warsaw, Faison, Beulaville, Rose Hill, Magnolia}

and represents a total journey of 76.3 miles.

The permutation below represents a total journey of 90.0 miles.

Solution 2 “gene” = { Faison, Rose Hill, Beulaville, Magnolia, Warsaw }

Let’s suppose these two “organisms” are selected to mate. Just like human children inherit their parents’ eyes, hair, etc. These “children” can inherit their own parents’ properties.

To produce the children, we can apply a “reorder crossover” on the last three towns.

Solution 1 has Beulaville, Rose Hill, Magnolia as the last three towns. In solution 2, they appear in the order: Rose Hill, Beulaville, Magnolia.

To produce the first child, we take solution 1 and reorder these last three towns so that they appear in the order the mate, solution 2, has them in. The first child is:

Child 1 “gene” = { Warsaw, Faison, Rose Hill, Beulaville, Magnolia}

Solution 2 has Beulaville, Magnolia, and Warsaw as the last three towns. In solution 1, they appear in the order: Warsaw, Beulaville, Magnolia. The second child is:

Child 2 “gene” = { Faison, Rose Hill, Warsaw, Beulaville, Magnolia}

Child 1 ends up representing a distance of 82.9 miles. Child 2 ends up representing a distance of 90.2 miles.

[iframe width=”425″ height=”350″ frameborder=”0″ scrolling=”no” marginheight=”0″ marginwidth=”0″ src=”https://maps.google.com/maps?f=d&source=s_d&saddr=Kenansville,+NC&daddr=Faison+Library,+Park+Circle,+Faison,+NC+to:Rose+Hill+Community+Library,+Rose+Hill+Community+Library,+113+S+Walnut+St,+Rose+Hill,+NC+28458+to:warsaw+library,+warsaw+nc+to:Phillip+Leff+Memorial+Library,+Phillip+Leff+Memorial+Library,+807+E+Broad+St,+Beulaville,+NC+28518+to:Magnolia+Florence+Gallier,+Magnolia+Florence+Gallier,+104+W+Main+St,+Magnolia,+NC+28453&hl=en&geocode=FdR7FQIdIWRa-ynZ7fq90d-riTFtuJB7JssBxw%3BFb_bFwIdYrBX-yHmR_hSKjzyhClB6TpToe-riTHmR_hSKjzyhA%3BFelmEwIdEn5Z-ynxNa4UJ9qriTERXAJmmhnHQQ%3BFaEKFgId0WdY-yFvJx4dp4AiVik1-E8T6ueriTFvJx4dp4AiVg%3BFbfaFAIdXmRd-ykV2RVUwGepiTEN_JI5aqu77w%3BFaR5FAIdYfZY-ylf62HwetyriTEk35vlsXboSQ&aq=&sll=34.937171,-77.952805&sspn=0.441312,0.619354&gl=us&mra=ps&ie=UTF8&t=m&z=10&output=embed”][/iframe]
View Larger Map
Child 2 never lived up to its parents’ expectations.
They wanted him to be a doctor. He went into ventriloquism.

Panic is something one wants to take off and throw away, so to buy cialis australia speak. Separation anxiety maybe triggered in the child even if he never experienced it before by moving cialis generic tadalafil regencygrandenursing.com to a new neighborhood or town or if you have recently been through a divorce. Gupta, who is a well-known Sexologist In Delhi.There are different causes of infertility in males, which includes: Heavy smoking & Tobacco Alcohol and drug consumption Severe stress & depression Hormone problems Low sperm count Premature Ejaculation Obesity Infection & tumors in testes Medication side effect Mobile phones kept generic viagra online in pockets Excess use of laptops on your lap can less your sperm count and sperm motility naturally. People run around with the problem saying that they feel uncomfortable free cialis without prescription wearing a rubber.

Neither children were as successful as their parents. In the next generation, they’ll be less likely to mate.

This is due to what is called the fitness function. The job of the fitness function is to assign to each solution a chance of mating. A simple one for the traveling librarian problem would be to divide 100 by the distance traveled, so that shorter trips have a higher chance of surviving to the next generation.

The idea is to identify traits that yield good results, and try to create solutions that take on those traits.

In our problem, Magnolia and Rose Hill are near each other. Solutions that place these towns next to one another are more likely survive to the next generation, just like real organisms develop traits that aid in their survival in the wild.

So what about art? A popular way to create art on a computer is to apply transformations, functions which alter the image. As a quick example, consider this drawing of Agreeable Andy:

Agreeable Andy

“I don’t want to be an example!”

And three functions: “Rotate by 90 degrees”, “Flip horizontally”, and “Color the left half red.”

Depending on the order we apply them to Andy, we get a different result:

Andy

“Get me off this thing!”

Look familiar? Each drawing is the product of a permutation of functions. Each permutation can be an “organism.”

The organisms are:

S1 = { Horizontal flip, Rotate 90 degrees, Left half red }

S2 = { Left half red, Rotate 90 degrees, Horizontal flip }

Now all we need is a fitness function, something to determine which qualities are desirable.

Oh, it turns out computers aren’t all that great at having these kinds of preferences.

But you are! All you need is a program that presents you with art. You select which ones you like, and the program will eventually identify which qualities you like. You get to play nature, selecting which “creatures” are most likely to survive.

Such a program exists, too. If you want something to play with, go download Evolvotron. It produced the image at the top of this post.

"<a

The screenshot above shows the program at launch. The images are fairly simple, but if you keep at it long enough, you can generate some intricate and complex ones.

I don’t see why generative art needs to live entirely in the realm of the abstract. If it’s not out there don’t think it’ll be too long before someone thinks of combining Evolvotron with, say, Makehuman.

“Evolved art” raises an interesting question, though. Who is the artist? See the image at the top of the post? I didn’t really do anything to make it. I didn’t do the work involved in painting the image. I didn’t even write the program.

On the other hand, the image wouldn’t exist if it weren’t for me.

Am I the artist merely because I have an eye for a particular result? What do you think?

Author Obligations and the Millennial Generation

Like last week’s post, this week’s topic was suggested by my wife. For those not in the know: you, too, can suggest a topic. Almost anything that falls within the realm of “storytelling, art, and mathematics” is welcome – even if the fit is vague.

 

If you haven’t seen my “about me” page, I teach mathematics. I started teaching my senior year at The University of Tulsa. I was put in charge of what were called “quiz sections.” Some of you may have heard of “supplemental instruction,” peer-lead tutoring sessions which numerous colleges provide. “Quiz sections” were similar, although I was given the additional responsibility of administering quizzes. The novelty of grading papers lasted one day.

I was the same age as the students, and lived on campus. Both of these facts resulted in more than one amusing situations.

My geology lab partner was one of my students.

Every so often I’d bump into them at a party, where we’d learn we had mutual friends.

Except for the kid who dropped the class after one of these encounters, any initial awkwardness was swiftly eradicated by the realization, Oh! We have the same friends. And we’re the same age.

We’re even in the same clubs. My last year in Tulsa, I joined APO, which is a community service fraternity. A few of my students joined with me, and we’d work at the food bank and build houses for Habitat for Humanity together.

Then I graduated, moved to North Carolina, and grew older. Sometime over the span of the next four years, I managed to complete my doctorate. In my spare time, I aged a bit more.

One day, not too long ago, I realized I was now a different person. Then I realized I was wrong. I’m pretty much the same me. The students were different.

Sometime between 2004 and 2013, the world decided it needed to be constantly plugged in. Then it decided it no longer needed wires.

My “internet empire” was recently upgraded, but my art gallery still reflects the hand-crafted-HTML internet I grew up with. What happened?

I’m not that old. I was born in 1983. So whose generation am I in?

It turns out I’m in the gray area between Generation X and the Millennial Generation. I missed out on most of the events which shaped Generation X. But the information age blast that affects so many of the Millennials didn’t really hit me until I was almost in high school.

1996, the year of Space Jam and Dolly the Sheep, ushered in the end of pay-by-hour AOL. For the majority of my childhood, “online” meant HAL-PC, Houston’s local BBS. Next year’s collegiate freshman class had just been born.

For today’s eighth-grader, “online” means near-instantaneous access to just about every form of media imaginable. In the palm of their hands. If this doesn’t blow your mind, chances are you’re a Millennial.

Let’s play a comparison game. My childhood. Theirs. I don’t think we grew up out of the same world.

It’s not just access to information that has changed. Even more so, the role of creator has changed.

First, there’s the obvious: everyone can be a content creator. How do you think this blog got here? It wasn’t because I submitted my posts to a publishing agency that decided I had something worthwhile to say.

One day I decided I’m going to author a blog. Then I did. And if anybody doesn’t like it, I can stick out my tongue and go, pfffffffffffffttttttttttt, which used to be theme song of internet connectivity.

Additionally worry about your performance anxiety can only makes cheap cialis your PE worse. After calculating BMI, pharma-bi.com on line cialis compare the number to a rough guide for what the outcome number actually means. Having a man with free cialis erectile dysfunction is always miserable for a woman. The students can even earn their high school credit or get auto insurance discount, after taking a DMV approved drivers ed course. viagra levitra

Second, the relationship between creators and consumers has changed. There’s a lot that can be said about this. Intellectual property and copyright is a dissertation in itself.

So I’m going to address a question my wife brought up at dinner last night.

 

Q: What obligations do authors have to their readers?

 

Both of us are in fields where there’s diminishing tolerance for being set in our ways. I was reminded of this late last semester, when I received an email from a student at 1 am. I didn’t respond until I woke up the next morning, after he already asked me why I didn’t reply.

I don’t think it’s such a horrible thing to not be available 24/7. People aren’t, but information is. At least, that’s what we’re now used to.

As for authors, and content creators in general, there’s less and less room for the person who produces work behind a curtain.

In a way, we seem to be heading back to the days of the storyteller, telling a tale before a crowd and a fire. These were the days when the audience had a personal connection with the creator. They were there. They could ask questions, discuss the story, or whatever else they wished.

I’d hesitate a bit to say the internet provides “personal connections,” but how many of you have tracked down the website of your favorite author so you could ask a question or find out a bit more about them? How many of you have looked for their Facebook, Google Plus, or Twitter page, only to be vastly disappointed to find out they had none of these?

If you were born after 1995, “the internet” has been a household name for just about your entire life. “If it’s not online, it probably doesn’t matter.” If it’s not the case now, eventually that line will be a death sentence for the hopes of anyone wanting to publish without an internet presence.

This isn’t a case of traditional publishing versus electronic publishing. Whatever media is bought, in whatever form, this is the case of the consumer’s growing desire to feel connected to the producer.

Popular books aren’t just books. They’re cultures. Think of the vast library of fan fictions associated with top novels. I had never heard of “fan fiction” until I got to college. Now, fan fiction is endorsed by Amazon.

Picking up a copy of, say, Harry Potter, was doing more than just selecting a book to read. It was an invitation to participate in a sub-culture.

Going forward, I expect to see the wall dividing the producer and the consumer continue to crumble. Lurking in the shadows will be increasingly difficult. The author will take more of the role of a performer, expected to interact with their audience.

What do you think? Are we headed to a new golden age of authorship and readership?

 

* * *

 

Speaking of interaction, let me say “thank you” to everyone who has submitted a solution to A Conundrum of Eggs 1. If you’re sitting on an answer, it’s not too late to submit one yourself!

Much like its inspiration, A Tangled Tale, the answers aren’t revealed until the end of the tale. Since A Conundrum of Eggs has three installments, this rule may need to be tweaked so that nobody has to wait until October.

Artwork Endeavor Five Year Anniversary

Drawing has been an on-and-off hobby of mine since, well, I can remember. When we were little, my brother and I used to spread huge pieces of moving paper on the living room coffee table and create mural-like drawings.

Thinking back, I’m sure some of them were inspired by Mark Kistler’s Secret City drawings. We were sometimes shown these videos in school.

 

[youtube=http://www.youtube.com/watch?v=4tK70tHKhME&w=400]

 

 

I always liked to doodle every so often, but for the most part, I considered my brother to be the family artist.

Five years ago my wife and I moved away from Chapel Hill, NC. She had just finished her degree, and since I was still attending NCSU, we moved closer to Raleigh.

With all of our stuff in boxes, all I had to entertain myself were a couple old boxes of colored pencils (the date stamped on the box goes back to the Clinton administration).

I was working on this project called History of the Wiener Dog, which would become An Orthogonal Universe. I had just become stuck on what would become A Foundation in Wisdom, when I had an epiphany. Why don’t I try drawing out the scenes I’m writing?

With that, I immediately got started procrastinating. Below is the very first drawing I completed in summer 2008.

 

Helicopters

R: You look real goofy driving that old thing.
L: Yeah? Well, that’s the most hideous fedora!

 

The above drawing has nothing to do with the plot of An Orthogonal Universe, but it did have one significance. I would soon start making a real effort to improve as an artist.

I took my old Clinton-era colored pencils and colored Ry, the Squirrel.

 

Ry the Squirrel

Poorly drawn Ry the Squirrel!

 

There was a novelty in seeing some of the characters I spent the past year writing about “come to life” in a visual form. Maybe that’s why I kept going, even after I broke through the writer’s block.

 

Start of Artwork Endeavor

 

I consider the image below to be the first drawing that came after a point I said to myself, “hey, I think I’d like to give improving a shot.”

This is a scene from An Ember in the Wind, the sequel to A Foundation in Wisdom.

 

Poorly drawn Mara

Mara and the Puppets! Mara has always had a Wolfpack Red tunic. The colors of Locana, the city she lives in, are Carolina Blue.

 

Eh, that wasn’t very good. The “puppets picture” is an important one, though. Every so often I redo it. The problem with learning any skill, especially if you’re self-teaching, is that progress seems to come so slowly. Improvement is measured in months and years, which is problematic if you get discouraged early on.

Below is the last colored pencil drawing I ever did. It’s John Bartlebee and Sheridan, the protagonists of the An Orthogonal Universe series.

 

LeSabre '88

The stars of An Orthogonal Universe: John Bartlebee and Sheridan! John drives an ’88 Buick LeSabre. John operates his school of the classical sort out of his classic car.

 

Sometime later I realized I could scan my line-art drawings and color them on the computer. I sat down with my copy of The GIMP, and griatch-art’s tutorials, and gave it a go.

Hey, it’s the puppets picture again!

 

Mara 2

Slightly better Mara and the Puppets. This is the very last drawing I did with a mouse.

 

2009 – 2010

 

My wife got me a Wacom Bamboo pen for Christmas 2009. Once I got the hang of it, it made a huge difference.

But, starting in 2009, my free time dwindled considerably. In Fall 2008 I finished the last of the core coursework in my degree program, and began working with my research advisor.

Qualifier exams are notorious in just about any Ph.D. program. Despite their infamy, the workload only goes up once they’re over and done with. At least at NC State, though, the pressure goes down.

The qualifiers make up the last “gateway”, after which, few people leave the program. Still, I didn’t have much time for anything other than quick doodles. Here’s an illustration of Marcus, the protagonist of A Foundation in Wisdom.

 

Marcus

An old illustration of what is now chapter 12 from A Foundation in Wisdom. Marcus is contemplating the highway.

 

Physical pfizer viagra tablets therapy aims to restore the proper function of the thyroid gland. It removes stiffness and also increases the mobility of valsonindia.com buy cialis limbs. If the flow of the blood is levitra samples enhanced, it would lead for harsh results of recovery. The sacral vertebra runs from the pelvis to the end of the thing. pfizer viagra for sale is a wonderful drug for curing erectile dysfunction and the good thing is that it does not cause any side effects.

2011 – today

 

I graduated in May 2010. After my first semester as a full-time professor, I began to have more free time.

Everything except my degree program was put on hold until I graduated. Afterward, I came up with the idea of an illuminated hypertext novel. I started creating a lot of full-color illustrations for A Foundation in Wisdom, one for each chapter. This version had 30 chapters.

Of the set, the image below is one of my favorites.

 

Eru

Chapter 17 of A Foundation in Wisdom. Marcus climbs the Mount of Mislor to meet with Eru, the wise man.
Random trivia: “Mislor” was my mom’s AOL username back in the mid 90’s. I think my brother came up with it.

 

If you’ve read the book, some of these scenes may look familiar. The one below won’t, unless you read the 2011 version.

 

Peoria

Peoria from A Foundation in Wisdom. This was an illustration of a scene in which Marcus and Peoria went inside a leaf. The scene was deleted from the final manuscript.

 

Vasigari

Vasigari, the Priestess from A Foundation in Wisdom. Poor Marcus – do legs bend like that? I still like that forest.

 

Like I said earlier, learning a skill can be frustratingly slow, unless you’re the patient type.

I like to think I’m of the “patient type,” at least, most of the time I am. But, sometimes, it’s easy to look at the work of people who have been at it much longer than you – and forget just that – that they’ve been at it longer.

That’s why I sometimes redo the “puppets picture.” It was the first illustration. This is the last version, and already it’s over a year old.

 

Mara 3

Mara and the Puppets – the latest version! Recognize the machinery?
Fun fact: The desk and lamp is a reference to the attic in Alone in the Dark.

 

It was completed in March 2012 (although it’s dated 1 April). At this point, I was still planning on releasing An Ember in the Wind as an “illuminated hypertext novel.” So I needed to redo this illustration for the new site, anyway.

This was also the last illustration I created with the intent of releasing An Ember in the Wind as an illuminated hypertext novel.

For various reasons, I pulled the project. A couple months later, I re-declared A Foundation in Wisdom as a novel, and began working with editor Kisa Whipkey to polish it.

While I was waiting for the manuscript to come back, I took requests from random people on deviantART.

 

 

superheroes

Someone on DeviantART asked me to draw her and her friend as superheroes. That’s a futuristic San Francisco in the background.

 

And, just because I felt bad for John Bartlebee and Sheridan, I redid their scene.

 

LeSabre 2

John Bartlebee and Sheridan make their return after 4.333 years. That’s a much nicer looking LeSabre!

 

Now we get to this year! Although I’m not doing illustrations for an “illuminated hypertext novel” anymore, I still enjoy drawing. Up above I mentioned griatch-art’s tutorials. Below is a scene depicting one of his characters.

 

Biltmore

griatch-art@deviantART asked people to draw his characters. That’s Ebb the Dragon, about to make a snack of the Biltmore estate.

 

We’re coming to the end! After nearly five years, I figured it was about time to try drawing myself. I tried using a mirror as a reference, but I kept getting myself backward.

Thinking about what happens next in a story can be hard work. Despite all those monitors, I still primarily use 15-cent Walmart notebooks.

 

self

Incomplete self portrait. Shown: me, hard at work revising A Foundation in Wisdom, while in actuality, putting the real task off.

 

And now, the latest illustration – completed five years after I drew the very first doodle in my notebook.

Even though I’m not working on an “illuminated hypertext novel,” I haven’t lost sight of why I started drawing these scenes in the first place. Drawing the scene out is a great way to break through writer’s block. And since I’m working on An Ember in the Wind, well, here’s Mara again.

 

Forest

Five years later, I finally drew a forest I’m happy with.
Mara still has her Wolfpack Red tunic. Go State!

 

After five years of self-teaching, I’m finally pleased with how I’m doing. As for the illustrations, I may have found a use for them.

I don’t think my experiments with the “hybrid novel”, or “illuminated hypertext” are done. But utility aside, sometimes it’s just fun to draw.