Welcome to Dream.In.Code
Become an Expert!

Join 137,420 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,977 people online right now. Registration is fast and FREE... Join Now!




Generating a random pattern

 
Reply to this topicStart new topic

Generating a random pattern, Using 1 or 2 shape

bentoh
24 Jan, 2008 - 06:57 AM
Post #1

New D.I.C Head
*

Joined: 24 Jan, 2008
Posts: 1

Is it possible to generate a background like this??

IPB Image

Some of the problems are:
1) It's hard to make the shapes jam packed...
2) To avoid "collision" between elements, someone suggested me to "drop" the element from top and let it "settle"... but the "collision" between elements is big issue...

Thank you very much... smile.gif
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Generating A Random Pattern
24 Jan, 2008 - 07:47 AM
Post #2

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 11 times
My Contributions
Collision detection: there is a plethora of papers on the web on this, but almost every graphics package / framework has it built-in, so I think you should not worry about it that much, just look for a suitable API.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/5/08 04:18AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month