Getting into Generative Art via Processing

Lately, I started getting into Generative art. The idea that I can use code to generate artwork appeals to me. I’ve only got into working in Processing, a language for generative art (Java-based), for about two weeks now and already I can see its possibilities.

At first, I just tried to get the basics down. The documentation and tutorials on the Processing got me started, as well as watching a bunch of videos off of The Coding Train and reading Generative Art: A Practical Guide Using Processing to get my head around what Processing was able to do. It’s Java-based, but there are forks of it in Python and Javascript.

With a loop and varied-sized rectangles, I pumped this out. Not too interesting yet but it’s a start. Then I tried the same thing but trying dimension with ellipses.

It’s a mess, but it’s my mess.

Then I started to play with spirals and transformations.

The other night I couldn’t sleep and started working on this one with lines and mountain-like peaks.

Processing makes it pretty easy to “sketch” ideas, building off one idea to another. It reminds me a bit of Design I at CVA where we’d use layout bond to duplicate and tweak iconography. I can create a basic framework for a sketch and then run it several times to get varying results. Small changes to variables can result in completely new visuals.

I saw this posted to the Generative Discord server and thought it was pretty interesting and gave it a go.

Version 1, I created a grid and made rules of how the grid shapes are filled in.

Version 2, adding texture, varying the size of the grid.

Then Loki aired yesterday I gave the carpet at the TVA a try. This uses a similar grid system to the two above, just with arcs in alternating patterns.

That’s it for now. I’ve been working on a few of these sketches a day so more on the way.

Hour of code

Wow, it’s been a while! Yesterday I got the opportunity to participate in Hour of Code, a global program that tries to get kids learning what code is and how it’s used every day.

I talked yesterday with Mrs. Hansens’ 2nd-grade class at Lincoln Elementry, Bemidji for about 20 minutes, giving examples of what code is and how it’s all around us. Afterward, I helped students work through logic problems in their computer lab using Scratch. I was amazed at how quick the students just “got it” when working through the problems.

Hour of Code a great program and hopefully they’ll ask me to participate next time.

Get them early with Source Control!

This semester I’m an adjunct at Bemidji State University! I’m teaching BUAD 3283 E-Commerce Web Development (3 credits) to a mix of business and computer science majors.

We’ve had many interns from BSU in the web development department at PBC, and two things that we emphasize with them is source control management (SCM) and test-driven development (TDD). So for my curriculum, I wanted to add at least SCM.

I briefly touched on SCM in one of the first classes, going over how to use Git get code pushed to GitHub for assignments. My students were struggling with getting their code pushed to their repositories so today I let my students have the class to ask questions.

Originally I’d demoed using Atom for writing code then using SourceTree for pushing to their repositories like we do at work. One of my students was using GitHub Desktop (kind of by accident). I’d forgotten about that tool and it seemed to make more sense to use since Atom, GitHub, and GitHub Desktop dovetail nicely together.

 

I have used GitHub Desktop for a few projects before but I tend to use SourceTree or just command line:

$ git add --all; git commit -m "add all the things"; git push;

 

Getting back into it.

I am trying to get back into the habit of doing a bit drawing every night. Here’s a few of newer ones. I’d like to get one a day done again, collecting a bunch to make a coloring book like I made a few years ago.

.env environment variables when working with Apache

I’m getting in the habit of using a .env file for loading environment variables. Laravel already uses them for setting up configuration. It’s a nice way to setup variables that can be used in bash or through a php library like vlucas/phpdotenv.

For a site I’m working on I wanted the environment variable APP_ENV set to “local” in development and set to “production” on the live site (each environment has it’s own .env file). My configuration keep on getting overridden somewhere and returning “dev”.

What happened was the APP_ENV environment variable was already set in the Apache virtual host configuration and phpdotenv will not override variable set in Apache virtual host configuration.

If you are running into this same issue a pretty easy fix. Unset the variable in you .htaccess file and then the correct value will load from your .env file. At the top of my .htaccess file in the public root I have this then:

<IfModule mod_env.c>
    # unset the APP_ENV variable since it might have been set in Apache's vhost file and needs to be used from .env
     UnsetEnv APP_ENV
</IfModule>

Hope that helps!

No Miles, We’re not moving to Canada.

Well, tonight I kinda freaked out our 8 year old son Miles. We has just sat down for his ritual of one episode of The Big Bang Theory before bed. Katie was looking though news feeds and mentioned that Trump had taken the Florida primary and that Marco Rubio was likely to suspend his campaign (then he did shortly there after).

“Well, I guess we’re moving to Canada” I said. Miles turns around with tears in his eyes. “Are we really moving? I won’t get to see my best friend [omitted] anymore?!”.

After a little while he was calmed down and went back to watching Sheldon swimming in a ball pool with  Leonard chasing him. Bazinga!

Bazinga. That’s all I can say about the current political theater. I don’t think we’re going to leave the country over it though.