Transformer
A related pattern
Change an object's form by translating and/or rotating its rigid
components.
In physics, a rigid body is an idealization of a solid body of
finite size in which deformation is neglected. Although most
architecture structures are, in essence, rigid bodies as a
whole, most have mechanisms within them (think of a door
hinge). Interest in larger scale mechanisms in increasing,
though the most obvious examples are still to be found in
stadium roofs \cite{aGoodRetractableStadiumRoof}.
Use this pattern when you are making quick approximate models of
the motion of an assembly of rigid bodies.
Apart from such systems as tensioned membranes, bending members
or inflatable structures, mechanisms are needed for movement in
design. In such a structure, every components is a rigid body
and links between components restrict feasible relative
motion. Components can rotate and slide with respect to each
other. Some parametric modeling systems provide *kinematic
analysis* packages, which compute allowable states of
mechanisms. Certainly use these when they are available, but
understanding how to model simple mechanisms directly remains an
important technique.
The Transformer pattern has two basic
features: rigid bodies maintain the same shapes and sizes during
a transformation, and these bodies slide and/or rotate along a
path or according to a rule. Understanding and codifying the
rule is critical to modeling a mechanism.
First the components must be rigid bodies. Before
creating the model, you should distinguish the rigid bodies from
other parts in the models. While the body can be complex, it
will typically be based on a Jig: a
relatively small collection of simple geometric elements. Except
for position, these must be indepdent of any parameter that
drives the mechanism. In a model of a rigid body, make its
Jig as simple as possible and then
define all the detail solely in terms of the
Jig.
Secondly, the transformation is constrained by the
components. After the first step, the rigid body has one or
several geometries as the anchor. Making this anchor
transformable is the key. Some properties of this anchor could
be variables such as the parameter along the curve, the number
of the panels or the angle of rotation. Some properties could
also be driven by independent Controllers.
Scissor Arm
Model a scissor mechanism, that is, an arm whose horizontal
extension is controlled by its handle's vertical movement
along a line.
In this model, lines model the scissor arm rigid bodies. All
lines are of the same length. The anchor comprises a fixed
line in space and one of its endpoints.
The next step is to define the anchor. There are several
parts available to be used as the anchor - the start point
or the endpoint of frames. In this sample file, you take the
two frames crossing point as the anchor. This series of
points slide on both X and Y directions, anchoring a middle
line path between the two controlling points and a
changeable distance between each other. Since all the frames
are of the same length, after calculating the first anchor
point, it is easy to locate all the rest anchors. Finally,
you apply crossing frames on each anchor points and get the
extendible frames.
Download Tran_Arm.gct
Square
Use polygons with right angles as a shutter.
Four polygons, each having one right angle, can be arranged in spiral pattern around a square.
Changing the size of the square moves the polygons such that
they model a shutter. Polygon sides appear to slide along
each other. A parametric model for this is almost trivial.
Download Tran_Square_Simple.gct
Rotary action of the shutter, and perhaps more geometric
insight, can be had by realizing the that shutter corners
move along arcs of circles with centres at $90\; degree$ intervals on the
circumference of a circle of the same size.
The lines defining the right-angle sides start at the
shutter corners and pass through the guide circle
intersections.
Download Tran_Square.gct
Shades
Model vertical and horizontal shades covering a window.
Sliding blinds are a common window covering. Overlapping horizontal
and vertical blinds open a view slowly at first, then rapidly as they
approach their full travel. Of course, they require double the
material of a single blind system. Modeling such blinds is
straigtforward, except for one trick: coordinating smooth movement
across all of the blinds. The trick is that the points controlling the
location of the blinds are parametric points on the window diagonal
and are themselves controlled by the $slidePoint$, a single parametric point on any
curve, anywhere in the model. Here is how it works.
Download
Tran_HVShades_Feature.gct
Download
Tran_HVShades.gct
Differential
A mechanical differential mechanism links rotation through three
axes. Using coordinate systems multiple axes can be linked. Of course,
this is a representational device only---actually constructing such a
system could be a challenge.
In this sample, a vertical axes is linked to multiple axes at
$90\; degrees$ to the vertical axis. The
horizontal rotations are a function of the vertical rotation. The
modeling process is straightforward. To clarify the geometric structure, each successive
coordinate system is displaced by a small amount. Reducing this amount
to zero brings all objects to a central point.
The $Z$-axis of the $differentialCS$ coordinate system defines
the vertical axis.
The origin of the $inputCS$ coordinate
system coincides with $differentialCS$ and is rotated by $input\; degrees$ about the vertical axis.
Place $count$ coordinate systems (call these
$outputBase$) on the $XY$-plane of the $inputCS$, each rotated about the vertical axis
by $360/count\; degrees$ from each
other.
Place an $outputCS$ coordinate system, coincident with each
$outputBase$, with $Z$-axes aligned with the corresponding $outputBase$ coordinate systems. Bind the rotation around the
$Z$-axis of each outputCS to a function (the
simplest is $f(x)=x$) of $input\; degrees$.
Attach an object to each $outputCS$. The
objects will rotate as the input rotation changes.
In this sample the rigid bodies are circle segments, governing by
parameters for their subtending angle and radius. When the subtending
angle is $180\; degrees$, and $input$ is $0\; degrees$,
the overall form approximates a sphere. When $input$ is $90\; degrees$,
all objects lie in the $XY$-plane.
Download Tran_Differential.gct
Shutters
Simulate the shutters' movement along a free curve.
\NtS{The function in this script doesn't work and is
very long. Debug and simplify.} In the image,
Mercedes Benz ML320 uses shutters to cover its curved
sunroof. It is easy to draw the shutters of a planar door,
but tricky to deal with a curved surface. No need for
reticence, the shutters are rigid bodies. Each piece of
shutters not only slide along the curve, but also cover on
the previous piece so that there is no leaking.
In this model, the most interesting part is not the anchor
of shutter, but the rest part of the shutter. One side of
the shutter slides along the curve. Each shutter's anchor is located
and indentified through its index number. For the rest
part of the shutter, to cover the previous piece property,
there are two conditions: *covering on* the previous
piece (A) or *snaping* to previous piece's starting
points and *sticking* out (B). How to distinguish
these two conditions? You can draw two directions (direction
1 from the current shutter's start point to previous
shutter's start point, and direction 2 from the current
start point to the previous's endpoint) and get their cross
product direction. Wether or not this direction is positive
determine which condition it belongs to. Through using
"if...else" statement in the script, you can make your
shutters responsive to the different conditions along the
free curve.
Download Tran_Shutters.gct