09-26-2003, 03:12 PM | #1 (permalink) |
Stop. Think. Question.
Location: Redondo Beach, CA
|
Looking for program to randomly arrange shapes
Hi.
I'm looking for software that takes a number of shapes of different dimensions and can randomly arrange them within a fixed area. For example, my shapes might be 8 different sizes such as: 20 x 20 15 x 20 30 x 25 etc. The area I'd like them to fill might be: 500 x 1500 The program would go through my list of shapes and randomly arrange them within the 500 x 1500 area. A drawing would appear on-screen with the layout. I've found a few pieces of software to do this but they weren't necessarily right for the job. Only one seemed a match but I can't figure it out and the developer is located in India - not a phone call I want to make. If anyone would like to write such a program, let me give you some more details and tell me your price. Thanks.
__________________
How you do anything is how you do everything. |
09-28-2003, 09:46 PM | #3 (permalink) |
Crazy
Location: Fayetteville, AR
|
I have c code that arranges dims like that, but it just outputs the coordinates (intro to programming project ). If you know c you could work on it drawing the final result.
It works just like you stated, arranging rectangles symmetricly inside a larger rectangle. If you want the code, let me know. If I don't answer within a day or so, just PM me. |
09-30-2003, 11:13 AM | #4 (permalink) | ||
Stop. Think. Question.
Location: Redondo Beach, CA
|
Quote:
Quote:
Just to clarify to any readers out there: -- The program should run via the web, therefore Java-based -- If you can write such an app, what's your rate? This is for a family business therefore I'm not upcharging or comparison shopping - just trying to find someone that can get the program written. Anyone up for the challenge?
__________________
How you do anything is how you do everything. |
||
09-30-2003, 06:35 PM | #5 (permalink) |
Crazy
Location: Fayetteville, AR
|
I have a few questions for you -
Could you limit the rectangles available to be entered? How random do the positions need to be? If you could give me an idea of what it is for, it would help - but I understand if you would rather not. If you want, I might give it a shot in PHP for free. The image drawing functions for PHP seem pretty simple, and that would make it web-based and os-independent. I really don't think it would be that hard if there is a decent limit on the rectangles inside (or the outer rectangle is a decent amount larger than the combined smaller rectangles). |
10-01-2003, 07:46 AM | #6 (permalink) | |
Stop. Think. Question.
Location: Redondo Beach, CA
|
Quote:
It's probably more effective to create a "library" of tiles such as: Library 1: 10x10, 5x10, 20x20, etc. Library 2: 10x10, 30x30, 30x15, etc. The user would input library 2 and the app knows it has those sizes to work with. I think it's up to the application to determine the number of tiles that will fill the polygon. The tile sizes need to be randomly chosen, not necessarily their location in the polygon. My father-in-law is starting a business that sells stonework. He has various sized stones (ie: tiles). The stone might be laid into a walkway, a patio, etc. I'm calling the area a "polygon" for lack of a better term. He'd like the ability to select a group of tile sizes and have them randomly populate the polygon. This would be his design blueprint, graphically and a listing of tile sizes and how many of each are required. Any tiles that spill over the polygon will be cut to fit, however the smaller tiles should probably be used to avoid waste. If you need more information, send me a PM. Thanks for your interest.
__________________
How you do anything is how you do everything. |
|
10-02-2003, 06:49 PM | #7 (permalink) |
Crazy
|
I'll think about how to arrange them so they fit perfectly then, because now i know exactly what you want. I'll see if I figure out a way doing this so they fit nicely using the applet graphics. If I can I can pm you and tell you so I could start. It shouldn't be that hard because they're all squares, the only thing I'm fuzzy on is if the area is, lets say a pentagon, if it should figure out a way to use less of the pieces which will be cut to fit.
__________________
-signature |
Tags |
arrange, program, randomly, shapes |
|
|