The shapes of buildings and other structures are usually no accident. Engineers and architects go to great lengths to ensure both that structures will be able to serve their intended function and that they will be stable. Often, the shape of a structure and its parts determine that structure's strength.
Rectangles are common in all types of structures, especially buildings. Windows and doorways nearly always take the form of rectangles. However, this shape is generally chosen for aesthetics and reasons of uniformity, not because it is inherently strong. In fact, without support along its vertical sides or the strengthening of its joints -- or both -- a rectangle is highly unstable.
If there is a single most important shape in engineering, it is the triangle. Unlike a rectangle, a triangle cannot be deformed without changing the length of one of its sides or breaking one of its joints. In fact, one of the simplest ways to strengthen a rectangle is to add supports that form triangles at the rectangle's corners or across its diagonal length. A single support between two diagonal corners greatly strengthens a rectangle by turning it into two triangles.
Arches are also very strong shapes. A force applied to the top of an arch, for example, will be carried vertically and horizontally in an arc along the length of the arch's sides all the way to its base. Still, very heavy loads can cause an arch to deform, or bend. To overcome this weakness, engineers sometimes strengthen arches with heavy buttresses or walls along their sides and bases. If an arch is rotated 360 degrees in a circle, it becomes a strong, three-dimensional, symmetrical shape -- a dome.