Re: Divide a rectangle (with cartesian coordinates) into equal
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Sat, 5 Jul 2008 17:12:02 +0000 (UTC)
Engeltje <Engeltje81@xxxxxxxxx> wrote in message <6a39dd94-98ea-
4c9a-a393-721ec384f874@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...
On 5 Lug, 16:29, dpb <n...@xxxxxxx> wrote:
Engeltje wrote:
Hi everybody, I need ur help!!
I have to divide a rectangle (with cartesian coordinates) into equal
squares and I need back each coordinates of this squares!
...
Not at all clear what you mean, precisely, but the sizes of two squares
whose are is half that of a given rectangle is pretty straightforward.
The coordinates could be placed wherever desired keeping those lengths
it would seem.
If the question is to divide a given rectangle in half so it becomes to
squares, that's only possible if it's original length is exactly twice
the height; otherwise it becomes two equal-area smaller rectangles.
So, what, precisely is the question/problem?
--
ok..I read wat I wrote...it's not clear...ok
the problem is:
-I have the coordinates of a rectangle (Xmin,Ymin,Xmax,Ymax);
-I want divide this area in N equal areas; where N is dymanic; and I
want the coordinates of this new points, edges of new areas.
Is it more clear now?
No, it is not clear.
Do you want to be able to specify the value of
N? Clearly this would be impossible in general,
as you cannot divide a rectangular region of
size 2x3 units into 5 squares.
If you just want the region divided into square
domains, where the number of such squares
is determined by the size of the rectangle,
then I already told you what to do, although
the solution need not be unique. For example,
how many squares divide an area of size 4x8?
Is it 32? Or 2? Or 8?
Even then in general, this may still be essentially
impossible to do in floating point mathematics
and a finite amount of memory. The simple
counter-example has a rectangle of size
(1+delta,1). If squares of size s are to tile this
region, then s must divide both 1 and 1+delta
an integral number of times. Therefore s must
be no larger than delta. Clearly for small enough
delta, this will require something on the order of
1/delta^2 squares. So when delta is small enough
this must fail due to a lack of memory.
John
.
- Follow-Ups:
- Re: Divide a rectangle (with cartesian coordinates) into equal
- From: Walter Roberson
- Re: Divide a rectangle (with cartesian coordinates) into equal
- References:
- Prev by Date: Re: Matrix or array imput?
- Next by Date: Re: Question about calling a function in command mode
- Previous by thread: Re: Divide a rectangle (with cartesian coordinates) into equal squares
- Next by thread: Re: Divide a rectangle (with cartesian coordinates) into equal
- Index(es):
Relevant Pages
|