Translation of Christopher Carlson's post " Twisted Architecture ".
Many thanks to Kirill Guzenko KirillGuzenko for help with the translation.
I didn’t set myself the task of twisting Norman Foster’s Hearst Tower into Möbius strip and sending him into space, or forcing
Mary X to dance tango with himself, I just got carried away. This is one of the professional risks of working with
Mathematica .
It all started with an innocent experiment in lofting - a technique also known as skinning, which came from shipbuilding. The purpose of my research was some three-dimensional forms, and lofting seemed like a great way to quickly achieve results. I wrote the
Loft function, which takes an ordered set of three-dimensional contours and wraps it around polygons.

To decompose the geometry of polygons from their topology,
Loft uses
GraphicsComplex primitives in
Mathematica . The coordinates of the contour points are collected in the first argument. The second argument is a list of polygons (
Polygons ), the coordinate values ​​of which are replaced by integer indices in the list of coordinates. It was easy to write the
Loft function, but it was necessary to show imagination with the indexing of polygons associated with the necessary points.
')

I worked with
Loft through the
Manipulate function, and was very pleased to discover some new and interesting forms in my research. You can download the
demo and try it yourself.


Even this trivial parametrization of a scalable twisted hemisphere gives an amazing variety of shapes, each of which offers interesting possibilities for learning.

The last of these forms brought me to the thought of the building of
Swiss Re Norman Foster in London, which locals call a cucumber (hereinafter referred to as Mary Ex).

I was surprised how believable is the Mary-X model in
Mathematica. It was immediately clear that my simple
Loft function could not cope with the creation of the diagonal grid of Mary-X, so I decided to generalize this function first.
Step by step, and now I already had a much more flexible
Build function, with the help of which I had the opportunity to model not only Mary X, but also many other architectural forms based on a combination of panels and their framing.
My
Build function works like
Loft , but it gives much more flexibility in specifying elements such as pipes and polygons and the algorithms for placing them on the contour grid. Like
Loft ,
Build's first argument is a set of contours. The second argument is a list of
Graphics3D primitives, which contain an additional argument that defines the algorithms for their placement on the contour grid.
If we present the contours numbered from bottom to top and the points on the contour from left to right, then the indices
{point, contour} will correspond to the coordinates of the integer coordinate system.
This is how the
Polygon primitive [{{0,0}, {1,2}, {1,0}}] is placed on the coordinate grid.

A primitive that does not contain an additional repeat argument is automatically copied across the grid. The explicit way to specify the type of placement of copies of an item is done by specifying a pair of transfer vectors, as in Polygon [{{0,0}, {1,2}, {1,0}}, {{2,0}, {1,1}} ]. Here is how this polygon will be placed on the grid:

In linear primitives, such as
Line and
Tube , the repetition argument specifies the frequency with which primitives are broadcast horizontally, and for horizontal primitives - vertically. By combining repeats of polygons, tubes, and lines,
Build gives me more flexibility in defining panels and structural assemblies. Here is an abstract structure that I created to demonstrate the use of
Build primitives.


Now that I have a
Build , my next task is to determine the shape of the Mary-Ex profile and build the corresponding contour mesh. As always, trying to find the easy way first, I first experimented with oblate ellipsoids, and as a result I found that the upper part of Mary X is too sharp for an ellipsoid. No other simple mathematical form came to my mind, so I decided to set the contour of an arbitrary shape through splines.
I remembered this demonstration with a potter's wheel (
Potter's Wheel Demonstration ), written by my colleague Yu-Sung Chan for modeling free-form bodies of rotation. It was exactly what you need.

Having opened the photo Mary Ex in a separate notebook, I moved the points of the spline profile until I got an acceptable approximation of its shape.

When I was satisfied with the result, I used the “Paste Snapshot” in
Manipulate to get the source code of this shape. From the source code, I took the coordinates of the control points of the spline and inserted them into the
BSplineFunction , which defines the profile.

The final step was to split the profile of the curve into equidistant horizontal sections. Universal functions for grid partitioning in
Mathematica allow this.


I extracted the coordinates of the grid points from the result of the execution of
plot , added the boundary points of the profile, and sorted the coordinates by
y to get a list of points from which I could build a Mary X contour grid.

The contours themselves correspond to the body of rotation, moreover, the radial coordinate of the profile points is
x , the altitude coordinate is
y , and the number of points around the contour is twice the number of Mary
X glass panels.

I tested
Build for correct display of contour points. It turned out what you need.


As a final step, I found the coordinates of the points of the contour of the border ring at the top of Mary-X and added it.
I will not deny that it took quite a lot of hard work with
Build to build a finished model. The case of Mary-Xx, the roof, the upper dome, rings, borders and transitions between separate parts - all required an individual approach. To select the properties of materials and lighting, I used
Manipulate and twisted the sliders until I got the desired values. And here is the result.

After I got the finished model, I could start her research. One of the unique advantages of
Mathematica is the ability to post-process structures through the use of replacement rules. The final model Mary Ex was presented in the colors that I asked for the dark and light panels of the building. Replacing these colors with new ones, I created this color variation based on the British flag.




Post-processing with the help of replacement rules can be applied not only to the attributes of the appearance of the object, but also to its geometry. And the fact that all of the coordinates of my model are in the first argument of the
GraphicsComplex makes coordinate transformations especially easy. And since all graphic primitives are attached to the same coordinates, the primitives will automatically move along with the coordinates during their transformations.
Using this technique, I wrote this
Manipulate to study variations in the radial geometry of Mary-X.


Now I have the opportunity to get answers to some interesting questions. And what if Mary X would be bilateral, not rounded? Trilateral? Four sided?

And what if the dark parts of Mary X were drowned in a building? And what if the notches would have been counter-directed to them? And what if London shook a really strong earthquake?

Answers to all these questions can be easily obtained with
Manipulate in
Mathematica . Surrealism is simply defined as the distance that the slider is shifted from its position corresponding to “reality”. My research ended up somewhere near this (in Dali's style) Mary Eks dancing with her.

Inspired by the results of my work with Mary X, I turned my attention to another Foster diagonal building - the Hearst Tower in New York.

Compared to Mary X, modeling the Hearst Tower was a big deal. The only difficult moment was the creation of angular areas with alternately protruding and drowning polygons. The rest was for the simple use of the
Build function. Here is my model of the main tower structure, rendered with
Mathematica 's default lighting.

The structure of the tower is created by the periodic translation of the polygons. For fun, I replaced the broadcast with a rotation, and after adding several floors I created this curved tower, rolled into a torus.

Having decided to go further, I spent another couple of seconds to add a second rotation around the axis perpendicular to the first one and created such a “mebius” building. I like this beautiful rhythm generated by the combination of a diagonal grid with bends and the ornateness of the Möbius surface.

Perhaps on Earth, the Mobius building would be difficult to sell. But I imagine it floating in space - the Space Gallery of Fine Arts - a kind of Guggenheim orbital gallery with a twist, in which visitors are told something like:
Do not forget to put on your velcro slippers and soft helmets ala 2001: A Space Odyssey and pay attention to the pieces hanging on the wall to your right. After you make a circle around the gallery, you will hang on the ceiling, looking at the opposite wall, which, of course, is the same wall - after all, it is the only one in the gallery. Enjoy the view of the Milky Way, and, possibly, the Earth flying somewhere in the distance.

