Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Random Pictures Using .pngs ... how?

by FoxtrotUniform (Prior)
on Aug 21, 2001 at 21:13 UTC ( [id://106647]=note: print w/replies, xml ) Need Help??


in reply to Random Pictures Using .pngs ... how?

Since other people have talked about the mechanics of writing PNGs with perl, I figured I'd talk about the random-pixels bit (since that's fairly close to my area of specialization).

If all you want is random, unrelated pixels, that's easy enough to do, but you'll probably want some way of restricting their intensity and color (to make it easy to generate a bunch of pixels that are all mostly red and fairly dark, for instance -- in my experience, once you have a random image generator with a bunch of knobs and widgets, you spend hours playing with it :-). You might also want to be able to set "gain" on the data -- higher gain would mean more pixels at high and low intensities, lower gain would mean most of the pixels end up at moderate intensities.

A more interesting (to me) kind of random image data is Perlin (or coherent) noise. Well-implemented Perlin noise has a bunch of cool statistical properties, but at a glance it's just smooth noise. I'd rant about all the cool things you can do with it, but I have deadlines to attend to, so I'll leave you with a url: this page, by Hugo Elias.

If you're really interested in this stuff, the canonical reference is Texturing and Modeling: A Procedural Approach, which is damn good.

--
:wq
  • Comment on Re: Random Pictures Using .pngs ... how?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://106647]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 16:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found