[R] Convert one rectangle into two rectangles

Avi Gross @v|gro@@ @end|ng |rom ver|zon@net
Wed Apr 27 17:27:13 CEST 2022


Just FYI, Jim, I was sent private mail by Javad that turns the problem aroundso not only are there no rectangles, but the problem is not 2-D. He is working with Spatial Polygons representing areas on the surface of a sphere (presumably Earth) and wants to subdivide them. This is a VERY different topic and there are packages and other references that might apply to his needs. I have no idea why the 60/40 split by area.
Yes, as a very simplified idea, I understand why he proposed dividing a rectangle proportionately but realistically what he is working with is a bit more like a trapezoid which is also bent into a third dimension.
So those of us wanting to help on the original problem can stop and, speaking for myself, I am going to approach many questions posed here more carefully to see if they are well-thought-out or are some kind of fishing expedition. And, since it has been made very clear multiple times that the scope of this forum is narrow and not meant to help with HW, and I have no idea how to verify it is not, ...




-----Original Message-----
From: Jim Lemon <drjimlemon using gmail.com>
To: javad bayat <j.bayat194 using gmail.com>; r-help mailing list <r-help using r-project.org>
Sent: Wed, Apr 27, 2022 5:59 am
Subject: Re: [R] Convert one rectangle into two rectangles

Hi javad,
Let's think about it a little. There are only two ways you can divide
a rectangle into two other rectangles.
The dividing line must be straight and parallel to one side or the
other or you won't get two rectangles.
If there are no other constraints, you can take your pick.
A                  E                    B
-------------------------------------
|                  |                      |
-------------------------------------
C                F                      D

AE = CF = 0.45 * AB

Alternatively the same equation can be used on the shorter sides.
If you want to cut it across the length, you can do it with an abacus.
While the IrregLong package can produce an abacus plot, I was unable
to find an R-based abacus.
For that I suggest:
https://toytheater.com/abacus/

Jim

On Wed, Apr 27, 2022 at 1:42 AM javad bayat <j.bayat194 using gmail.com> wrote:
>
> Dear R users;
> I want to convert a rectangle into 2 new rectangles. I have a rectangle (18
> m * 200 m), and I want to subtract 45 percent of it's area as a new
> rectangle. Is it possible to do this in R?
> Sincerely.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list