20

Nov

2008

PC – paint me a picture…

I can’t sleep. My mind wandered on the idea that I ought to have my computer making me art work. So, I popped out of bed and started coding. Then I stopped, and realized what an absurd endeavor I was pursuing…

It’s not really “impossible” for a computer to paint; I mean, it can use any program you can ;). It can muddle through pixel by pixel in hopes of stumbling upon something truly artistic. I’ll code it, if you watch it work. If I ask my computer to make me a tiny black and white picture – say 100 pixels square – how many images would someone have to review to find the few “artistic” images?

The answer, as you have likely already calculated:

1995063116880758384883742162683585083823496831886
1924548520089498529438830221946631919961684036194
5978993311294232091242715564913494137811175937859
3209632395785573004679379452676524655126605989552
0550086918193311542508608460618104685509074866089
6248880904898948380092539416332578506215683094739
0255691238806522509664387444104675987162698545322
2868538161694315775629640762836880760732228535091
6414761839563814589694638994108409605362678210646
2142733339403652556564953060314268023496940033593
4316651459297773279665775606172582031407994198179
6073782456837622800373028854872519008344645814546
5055792960141483392161573458813925709537976911927
7800826957735674444123062018757836325502728323789
2707103738028663930314281332414016241956716905740
6141965434232463880124885614730520743199225961179
6250130992860241708340807605932320161268492288496
2558413128440615367389514871142563151110897455142
0331382020293164095759646475601040584584156607204
4962867016515061920631004186422275908670900574606
4178569519114560550682512504060075198422618980592
3711805444478807290639524254833922198270740447316
2376760846613033778706039803413197133493654622700
5631699374555082417809728109832913144035718775247
6850985727693792643322159939987688666080836883783
8027643282775172273657572744784112294389733810861
6074232532919748131201976041782819656974758981645
3125843413595986278413012818540628347664908869052
1047580882615823961985770122407044330583075869039
3196046034049731565832086721059133009037528234155
3974539439771525745529051021231094732161075347482
5740775273986348298498340756937955646638621874569
4992790165721037013644331358172143117913982229838
4584733444027096418285100507292774836455057863450
1100852987812389473928699540834346158807043959118
9858151457791771436196987281314594837832020814749
8217185801138907122825090582681743622057747592141
7653715687725614904582904992461028630081535583308
1301019876758562343435389554091756234008448875261
6264356864883351946372037729324009445624692325435
0400678027273837755376406726898636241037491410966
7185570507590981002467898801782719259533812824219
5402830275940844895501467666838969799688624163631
3376393903373455801407636741877711055384225739499
1101864682196965816514851304942223699477147630691
5546821768287620036277725772378136533161119681128
0792669481887201298643660768551639860534602297871
5575179473852463694469230878942659482170080511203
2236549628816903573912136833839359175641873385051
0970271613915439590991598154654417336311656936031
1222499379699992267817323580231118626445752991357
5817500819983923628461524988108896023224436217377
1618086357015468484058622329792853875623486556440
5369626220189635710288123615675125433383032700290
9766865056855715750551672751889919412971133769014
9916181315171544007728650573189557450920330185304
8471138183154073240533190384620840364217637039115
5063978900074285367219628090347797453332046836879
5868580237952218629120080742819551317948157624448
2985184615097048880272747215746881315947504097321
1508049819045580341682694978714131606321068639151
1681774304792596709376

Yeah, let me know when you’ll be finished with your critiques. And for the love of sanity, keep colors away from the machine!!!

what other people have said

Martin says:

0 through 9 all have at least one instance of being in a groups of 1, 2, and 3. Only 3,4, and 9 have an instance being in a group of 4. If you let 3 be blue, 5 red, and 7 yellow, 0 would be black and 9 would be white. The even numbers would become the secondary colors to complete the palette. If this was done on Tuesday you’d have time on Wednesday to get a turkey for Thanksgiving. Have a happy one.

Martin:

Of all your comments so far, I find this one the most… err… interesting, or perplexing… I’m not so sure we’re on the same page here.

Are you relating a way to represent colors? Because I was grappling with the idea of how many discreet possibilities there are when generating even the smallest image. I.e. draw me every possible picture that you can on a 100 pixel square canvas.

There are always n^(10,000) possibilities, where n is you number of colors.

Could you please clarify what you’re telling me here? Why did you go with base ten, why did you assign THOSE colors to the primes, what secondary colors are we talking about? Is this an idea for generating random artwork? You can see, I’m a bit lost.

I’m not sure your idea will allow my computer to draw me cartoons like Saul Steinberg’s.

Martin says:

Andrew,
Something that is artistic, for me, involves human expression, development, skill and sensitivity in production. A computer might be able to produce something that aesthetically pleasing: but for me it would not be an artistic creation. That is not to deny any beauty or sensual stimulation the end result might generate. I’m also not suggesting here that that all art has to be beautiful in the sense of pretty, i.e. Edouard Manet’s Execution of the Emperor Maximilian, Gericault’s Raft of the Medusa, and Picasso’s Guernica. There are also painters who worked with color formulas, Seurat. Art is, again for me, about the human expression on a personal level. Could you write code to produce a voice that could interpret on it’s own a song with the artistry of Pavarotti, the poetry of Shakespeare? You may be able to write code that will allow you to personally express some generated outcome/art. In which case you would be using the computer, code, monitor, printer as the painter uses canvas, paint, and brushes.

Now about the rest of my post – Andrew, I know nothing about writing code. Many years ago on one of the first PC’s, I determined that writing computer programs was not something that I was going to do. I observed at that time that if computers were going to serve a broad range of possibilities someone would have to write programs for others to use.
When I looked at your post it was meaningless to me beyond the numbers it contained.
I looked at the mass of numbers and decided, sorry, to play. I didn’t choose base 10 they were the only numbers there. Glad it was not binary, not sure what I would have done with that. I was busy today so did not produce the color scheme as per my prescription, maybe later for fun. My initial observation was that some of the numbers appeared in pairs, how many? How many triples? How many quads (just observations)? Since you were interested in the art aspect I wondered how I might interpret this group of numbers as art. I began by assigning one of the primary colors to the number 3, just an impulse. Then it clicked that 5 and 7 would position the primary colors (BYR pigments not RGB light) in the center of a number field beginning with 0 and ending with 9. I should have reversed black and white since with pigments white might better represent no color and black represent a mixture of all of the colors. The secondary colors would be 4 violet, 6 orange and 8 and 2 ended up green with no possibilities for tertiary colors. The arrangement of the primaries should probably have been blue, yellow, red, but I was playing. The only real possibility is that this could be a way for generating random color arrangements from various number patterns such as the one you wrote, probably not art. Check out your art posting for a link to an unusual and very interesting art exhibit on campus. Again, I apologize for playing. I hope your Thanksgiving meal is as good as the one you posted for last year. We’ll have lots of family over for the day. Menu will be deep fried turkey, roasted turkey, grilled sausage, dirty rice dressing, cornbread dressing, Louisiana sweet potatoes, broccoli casserole, green beans, cranberry sauce, and assorted deserts. Happy Thanksgiving.

Martin:

Thanks for clearing all that up. I thought that’s what you might be getting at (coloring my numbers) with your post, but it threw me for a loop for while. I briefly thought you were some Internet genius imparting some some quasi-cryptic algorithm. Keep in mind, Martin, most of our information flow is pretty unidirectional. You could be anyone…

But, your thoughts and knowledge about color – as well as your implied interest in art – leads me to believe you may be an artist to some extent. Well, that and a lingering hunch… Care to confirm or deny?

I read the article, and I’ll probably check out that art exhibit soon; I have a little writing to do for my art class, so it may fit in nicely. I’ll post my impressions if/when I go.

Thanksgiving! A splendid day, and I’ll be cooking up a storm. I’ve been grappling with all my options, and I’ll likely post a menu when they are decided upon (broccoli casserole sound interesting!). The creations should be even better than the ones I made last year. One of my true passions: cooking, in case you didn’t know.

Happy Thanksgiving to you too.

Martin says:

Here’s the casserole receipe.

Broccoli Cheese Casserole

Cook 2 to 3 cups chopped broccoli Frozen broccoli is OK

Combine the following ingredients and melt together over medium heat
1 can of cream of mushroom soup Campbell’s is better than most.
¼ cup mayonnaise
¼ cup of milk
1 beaten egg
2 ounces sharp longhorn cheese

Combine mixture with broccoli in a casserole dish. Cover with bread crumbs and top with thin pats of butter.

Bake at 350 degrees until bubbly and brown.

This is not a heart healthy meal!

This is the rice dressing receipe. As you can see it’s quite a bit. I’m sure you can do the math to down size it.

Rice Dressing

1 lb Jimmy Dean mild pork sausage
1 lb lean ground beef
2 lbs lean ground pork
Brown and drain off fat

2 large onions, chopped
½ of a whole celery, chopped
1 green bell pepper, chopped
Add vegetables; cook for 30 minutes, covered, stir occasionally.

2 T roux
1 can chicken broth
1 t. salt
½ t. black pepper
½ t. red pepper
½ t. white pepper
Add roux, broth and seasonings, cook for 1 hour, covered, stir occasionally.

5 to 9 cups of COOKED rice You can adjust this based on how meaty you want it to be.
1/2 bunch chopped green onions
Add to mixture, stir, and serve. Always more delicious the next day! Can be frozen.

I’m working on a receipe for Italian sausage. It still needs some work.

Martin:

THANK YOU!

I’m thinking the broccoli casserole will find its way to my table on Thursday. Even if I don’t get to try them both immediately, I’ll let you know when I do.

Again, thank you. I love trying new recipes.

Martin:

I figured I’d save you some coloring time. I took your color recommendations, with 0 as white and 9 as black. You neglected to say what color number one should be, so I left it white as well. I scaled all pixels by ten.

You can copy the number above, and paste it here:
http://www.andrewdanderson.com/toys/numberColor/

hideous image. Of course, you can always insert your own number sequence. Let me know if you use it to make anything artistic.

Martin says:

Very interesting, I guess if I had been more serious about what I was doing I’d have caught the lack of color designation for the number one. The program you’ve written works quite well with your written code. I could not get it to work with anything that I put together. The pattern reminded me immediately of the work of Piet Mondrian. Check out the link and particularly Broadway Boogie Woogie, one of his last two pieces.
http://www.artchive.com/artchive/M/mondrian.html#images
Victory Boogie Woogie was the other and was unfinished.
http://www.gemeentemuseum.nl/index.php?id=031845&langId=en

Martin:

It should work with any sequence of numbers…

Interesting art you linked to. Some of those works look like they could be machine generated. I think they’ve motivated me to write a reverse-it program. Give it an image, it spits out the numbers 1-9.

Of course, that would not be a whole lot different from lossless image formats, but it looks fun to write.

leave a comment

name (required)email (required)website (optional)