Re: looking for code
From: John Gordon (gordon_at_panix.com)
Date: 05/18/05
- Next message: $p1r17u4l_gyn3c0l0g1$7_at_salmahayeksknockers.edu: "Re: Seeking help with Sed statement."
- Previous message: SM Ryan: "Re: Why I can not get the host's ip with the following program"
- In reply to: Billy Patton: "looking for code"
- Next in thread: Billy Patton: "Re: looking for code"
- Reply: Billy Patton: "Re: looking for code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 18 May 2005 16:33:33 +0000 (UTC)
In <Pine.LNX.4.61.0505180907520.8339@holster07.dal.design.ti.com> Billy Patton <bpatton@ti.com> writes:
> I seek some code that will fracture a closed polygon into rectangles
> The polygons contain no slanted lines.
> Here's a sample of the concept I need to do:
> THe one on the left is the original. The one on the right with the xx's show
> possible locations to fracture the polygon. Not necessarily on the x axis.
> ________ ________
> | | | |
> | | | |
> | ____| |xx____|
> | | | |
> | | | |
> __________| | __________|xx|
> | | | |
> | ______| |xxxxxx______|
> | | | |
> |______| |______|
> I'm open to suggestions, algorithms, plagerism ...
It appears that there is always at least one rectangle that has three
complete sides and a partial side (the upper-right and lower-left
rectangles in this example).
Find one of these rectangles and complete it by extending the partial
side until it meets at a corner. Repeat.
I'm wondering, though, if there are some hidden requirements here. Does
your solution need to find the fewest possible number of rectangles?
-- John Gordon "It's certainly uncontaminated by cheese." gordon@panix.com
- Next message: $p1r17u4l_gyn3c0l0g1$7_at_salmahayeksknockers.edu: "Re: Seeking help with Sed statement."
- Previous message: SM Ryan: "Re: Why I can not get the host's ip with the following program"
- In reply to: Billy Patton: "looking for code"
- Next in thread: Billy Patton: "Re: looking for code"
- Reply: Billy Patton: "Re: looking for code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|