Home

tworectangle

Tworectangle is a geometric term referring to the union of two closed rectangles in the plane whose interiors are disjoint and whose boundaries meet along a nonempty line segment. In this usual definition, the two rectangles touch each other along a shared side of positive length, but do not overlap in area.

If the two rectangles share a full side and lie on opposite sides of that side, their

Key properties

- Area: the area of a tworectangle is the sum of the areas of its two constituent rectangles.

- Perimeter: if L denotes the length of the shared boundary segment, the outer perimeter is P =

- Centroid: the centroid of the tworectangle is the area-weighted average of the rectangles’ centroids: C = (A1*C1

- Representation: a tworectangle can be described by the coordinates of its two rectangles, or by their

Variants and usage

- Rectilinear orientation: most discussions assume axis-aligned rectangles, common in tiling and computer graphics.

- Applications include tiling problems, layout design, and computational geometry procedures for union and boundary computation. See

union
can
be
a
larger
rectangle.
In
general,
the
resulting
shape
is
an
orthogonal
polygon
that
may
be
convex
only
in
the
special
case
of
forming
a
larger
rectangle;
otherwise
the
figure
is
typically
non-convex,
often
resembling
an
L-shape
or
other
simple
orthogonal
outline.
P1
+
P2
−
2L,
where
P1
and
P2
are
the
perimeters
of
the
two
rectangles.
This
reduces
to
the
perimeter
of
a
single
larger
rectangle
when
the
union
is
itself
a
rectangle.
+
A2*C2)
/
(A1
+
A2),
where
Ai
and
Ci
are
the
area
and
centroid
of
rectangle
i.
widths,
heights,
and
relative
position
along
the
shared
side.
also
rectangles,
polygon
union,
and
orthogonal
polygons.