PDA

View Full Version : Create without trying



jvvh5897
11-20-2010, 08:16 PM
A while back I wanted a program to generate images--if you have ever had a creative writing class you might have been exposed to the exercise where everyone in class writes a noun, verb and adverb on slips of paper and then the slips are drawn at random and you have to write a little story with the three slips you end up with. Well, I was thinking that it could be nice to have an image to throw in there too, so I wrote a program to generate images. The attached grew out of the image part of the idea.

I'm including the source code (not all that great) for lcc-win32 compile as a windows executable and the compiled exe--I've only tried it on a Win2k PC. The palettes in the program are all taken from the fractall .map palettes. Each image it generates should be unique, but many will look very similar after a few reps--I developed a few other ways to use the basic idea of how this program generates images, but I only have the ones that might be of use with 500 by 100 pixels in this.

I call the generation a 2D random walk, but it sort of grew out of fractal plasm and Coherent Noise ideas.

jvvh5897
11-28-2010, 09:08 PM
A slight improvement to the above, I changed a few things and added a fill from center routine--not sure if that is going to be very much good for 500 by 100 but it does make evocative images. The center out build uses symmetry rather than pure random walk--the pure rnd walk was not that interesting, but with symmetry it generates images that are often insect like.

jvvh5897
12-05-2010, 09:24 PM
I have had a chance to test the program on Win7--very slow--not sure why, it was a far newer machine than my box and I get full screen in 15 seconds or so. Might try for read/write to an array rather than to screen till all is computed and see if it ends up faster.

I set up the color palette to pick a start at random from the anywhere in the four palettes that I have in the program, and allowed a sinusoidal modulation of the color field to get some variations to the basic patterns. Results are interesting but I think only parts of the images are of use--say the butterfly or bird effects in the center out generation.

Anyway, here is one of the variations of that attached. Did not include the source as that is not much different from posted.

jvvh5897
12-13-2010, 07:31 PM
At the risk of talking to myself in this thread, I've got another post. This one just for the fun of it.

I was thinking that it might make a good XMas image to have some of the images the above files generate on a sphere or cube solid shape, then make up virtual tree decoration and packages under tree with them. I saw a wrapped sphere in the coherent noise info, but never could make that source code work. A quick search let me know that PhotoShop could wrap a sphere as an effect, but none of my photo manipulation programs had that. Found that glut part of OpenGL could do it--found some source but could only make a square wrapped program compile (could make it do the phantom zone rotation though--that was cool). While working on something else I looked at an old VP21 virtual Pascal compiler though and it had an example of a wrapped sphere that compiled right---not exactly what I was thinking of, but close enough. I'm attaching the program and the 128 by 128 24 bpp bmp images it came with and two replacement images that I put in as the Chrome and Backgrnd images from the rnd walk programs to try to make it XMas'y.

To be honest the molten metal ball effect works better as scary or mischievious than happy Xmas scene. But it is fun to watch--try to extract an image for yourself and rename it Chrome.bmp, see what you get!

Program tests OK on both W2k and W7

igoreshka
12-13-2010, 08:02 PM
the first post called "Create without trying", I am wondering what happens if you really try?:yes:

Condor
12-13-2010, 08:43 PM
I am listening JVV.. But usually u are waaaaaaaaay over my head....lol

jvvh5897
04-26-2013, 07:31 PM
18232182331823418235Been playing with square/diamond plasma fractal routine (see Paul Martz gameprogrammer page) and getting some interesting results. I'll attach a couple of jpg. Martz suggests that you do pre-fractal calc modulation of height, but I've found post modulation gives me more interesting images, at least so far.

Of the four images two are hemisphere and two hyperboloid of one sheet modulation (the two largely red for the latter). The one largely blue has the center of sphere at lower left corner and the last image has sphere center at center of image. There are three palettes used and the palette is about 50% of the interest in the image, the fractal calculation and the modulation are roughly equal in creating interest IMO.

dale_para_bajo
04-27-2013, 02:28 AM
Waoo!

Listen, art is not one of my hobbies. But I do like those pictures.

I like the third one. If I post that in NASA site many will think it is a corona mas ejection from the SUN. No body will reclaim jijiji.

jvvh5897
04-27-2013, 07:45 PM
Turns out I can use pre-fractal seeding with a random spray of pixels and get some interesting results--things that look even more like a nebula with stars than the first image above. Can get something that would make the blood spatter guys happy too, or make one think about drops from a sneeze. But most of my pre-seeding aren't as evocative as I would like and if I try doing a random spray with a color gradient it does not turn out as well as all one color spray.

Not that it likely matters, but I think I mis-spoke when I said it was a hyperboloid of one sheet--think the file names with iij were XXY modulation--whatever it was gave me assymptotes on each axis in each quadrant.

jvvh5897
05-28-2013, 05:20 PM
184831848418485Had a chance to play with the plasma code again over the weekend--playing with creating palettes and adding a routine to make symmetrical images in different ways. Figured I'd post a few images.