Science and Art Too

There is a definite advantage to blogging as an avocation instead of a vocation.  If were blogging for money and I posted on a topic that received, let’s say, the underwhelming interest yesterday’s post, Science and Art, did, I’d feel obliged to find a more interesting topic.   But since Older Eyes is my avocation, I’m going to take another run at the same topic, hoping to convince you that there might be something worth seeing here.  Thinking back, yesterday’s post did start out with a somewhat technical description of how engineers use MATLAB.   And with no warning yet!  You may have been underwhelmed by my dancing rectangles.  But today, have I got some art for you!

OK.  Here’s the warning!  I’m going to briefly describe what I’m doing in MATLAB to generate the digital paintings I’ll show you in a minute.   Here’s where you should skip to the next paragraph if a few light technical details are going to bore you into leaving.   I really want you to see the pictures.   What I’ve created is a program that tries to do what an artist might do when he works from a photo.   The program looks at individual points on the photo, records the color then applies that color with the equivalent of paint brushes that are in the MATLAB program.   I’ve written the program so that I can control the size of the brushes and brush stroke, choose heavy or light strokes, as well as the direction of the strokes.  But there’s some randomness in the way the paint is applied, just as there would be with a real brush.   The “paint” is applied directly to the photo image until the original image is covered.  Was that so bad?   Yes?  Sorry.   I’ll stop  (There’s a more detailed description at the end of this post if you happen to be a scientist).

What’s interesting is that by controlling the brushstrokes, I can change the look of the resulting painting from realistic to impressionistic to abstract.  Let me show you a video of the program working on a photo I took of some black-eyed Susans I took in the Santa Ana River bed.

Please (PLEASE) tell me that’s cool!  And by varying the brushstrokes, I can give the result an entirely different look.  Here are a few examples (please click on them to see the detail).  I particularly like the third image, larger brush, more strokes.

small brush, light touch

larger brush, light touch

larger brush, more strokes

heavy, long strokes

So, that’s today’s update on Science and Art.  I hope you enjoyed the images.  And if you didn’t, I promise to be back to writing tomorrow.


The MATLAB program selects uniformly distributed random points on the photo and reads the numbers that represent the color for that pixel. It then selects normally distributed random points around that point and replaces their colors with the one for the center pixel.   The spread (or standard deviation) of the probability density from which the random points are drawn determine the brush size and the correlation of the density determines the length of the brush strokes.   If many random points are painted around each center point, that gives a heavy brush stroke … the fewer points painted, the lighter the stroke. The program also allows the brush size and stroke to be randomly varied.   The total number of pixels selected determines how many brush strokes are applied.  The program pauses periodically so I can select a number of strokes that looks pleasing to the eye.

Explore posts in the same categories: art

Tags: , , , , , ,

You can comment below, or link to this permanent URL from your own site.

4 Comments on “Science and Art Too”

  1. Cheryl P. Says:

    I have been a “hit and misser” for a couple of days now. You unfortunately were one of those I missed. So as I was catching up on you last couple of posts….I totally see that MATLAB could be used to create some very cool art. I love the different looks you created with the black-eyed susans. It does sound like you have to be a near genius to pull that off though. I suspect, that if I had the afternoon to kill, I could adjust the brushes, the opacity, and the pressure on either Photoshop and/or Gimp and get a similar look. I don’t know how similar without actually trying it. And as the new Microsoft store is opening today and there is a free concert starting in an hour…I guess, I won’t be finding out today. Plus there is the fact, that I am not artistic as you are so even with the proper tools, I might still have my stuff coming out like total dog doo. Yep, there is always that possibility.

    • oldereyes Says:

      This has some interesting differences from what programs like Photoshop do. Since I posted these I’ve added some more flexibility that varies colors as well and I’ve created enough interesting images that I’m going to talk to an artist (photographic) friend about them. But I also plan on playing with some of the other available programs to compare.

  2. Cheryl P. Says:

    I was just messing around playing with Photoshop. You’re right. Just on the fly, I can turn a picture of daisies into a watercolor or an oil painting but I am not figuring out how to add new brush stokes that enhance the picture. Again, as I am not any kind of an artist, perhaps a more talented type could just use the brush tool and paint additional strokes. I think the daisy picture I was playing with had some pretty possibilities but not the same effect that your black-eyed susan pictures have. The other problem, with me at least, is it takes a lot of time and tries…before I accomplish what I want to in Photoshop. Gimp is easier but has lesser tools.

    • oldereyes Says:

      The tool I’m creating isn’t meant to just be set up and modify a picture, it’s meant to involve the artist in selection of the brush sizes and color modifications so that the creation is unique.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: