Place Holder
Organized Collection of Points
Use proxy objects to organize complex inputs when making
collections.
\label{sec:pattern:PlaceHolder}
Designs have parts. Parametric modeling enables a single model to
represent variations of a part, for example different window
designs. Copying the model, one copy for each part, and
adjusting the inputs to the copies is an effective
strategy. Typically a part has multiple inputs---customizing
each one is a lot of work. Use this pattern when you are able to
describe the multiple inputs to an model through a smaller
number (preferably one) of abstract proxy objects.
A very common situation is to array a complex module across a
surface or along a set of curves. If this module requires
multiple point-like inputs themselves defined on the target,
organizing these inputs is sure to be complex and error
prone. If you can define the inputs to the complex module
through a simple construct such as a polygon\index{polygon}, it is often much
easier to place the module. An arrangement of polygons on the
goal surface creates proxies on which the module can be later
(and easily) placed.
Place Holders have two parts. The
first is the proxy object itself: a simple object that carries
the inputs for the module. For example, a rectangular module may
require four input points, one for each corner. A four-sided
polygon can act as a proxy for these points: each of the
vertices of the polygon provides one of the points. The proxy
simplifies the arguments needed for the module: instead of four
points, use only one polygon. The second part relates the proxy
object to the model. For example, a polygon proxy can be placed
using a rectangular array of points by relating the $ijth$ polygon's vertices to the
points $\afPt[p]_{i,j}, \afPt[p]_{i+1,j},
\afPt[p]_{i+1,j+1} \afTMath{and}
\afPt[p]_{i,j+1}$Pij, Pi+1j, Pi+1j+1 and
Pij+1.. The code placing a generic object such as a
polygon is more simple and reusable than the code for a specific
module.
\renewcommand{\sampleNewPage}[0]{false}
Hedgehog
Use a collection of points as Place
Holders to locate components (spines) that are
perpendicular to a surface.
Every point\index{point} on a surface\index{surface} defines
a single frame\index{frame} comprising the
surface\index{surface!normal} normal and the two
vectors\index{vector} of principal
curvature\index{surface!curvature}. This \index{surface!principal
directions} is sufficient information to place and size spine-like objects on the
surface. The point provides location, the surface normal provides the direction for the
top of the spine and the vectors of principal curvature provide information for further
adapting the spine to context. Start with an Organized Collection of
Points defined by $u$ and $v$ parameters on the
surface. Instead of points, use coordinate systems---remember they have points inside
them! Each of the coordinate system\index{frame} points will serve as the
base of a spine. Define two graph variables $count$ and
$height$. Use $count$
to control the Organized Collection of Points to produce $count$ coordinate systems in each parametric direction. At
each of the coordinate systems, use the $z$-direction of the
coordinate system and the parameter $height$ to define a
cone.
\begin{bodyNote}
\pbOneCol[r]
{\pbIncludeGraphics[Samples/PlHoHedgehog/Gruz_Anita_Martinz.jpg]{width=\currentWidth}
\source{Anita Martinz}}
\end{bodyNote}
Download PlHoHedgehog.gct
Truss
Use lines as Place Holders to
locate the members of a truss.
Each member of a truss might carry information such as the
section of the member its moment of inertia, material and
modulus of elasticity. In addition, the parametric model for
truss members may be able to shape its ends depending on the
context in which it is placed. Placing a truss member though
requires only the baseline along which the member
lies. First, develop a feature representing a truss member
and requiring only a line\index{line} as a geometric input. Second, (and
in a new model!) create an abstract truss comprising line
segments to represent the truss members. By applying the
truss member feature to these baseline Place
Holders, the detailed truss members are put in
place. This is, of course, a simplification of a real truss
member Place Holder in which the
truss member parametric model would need sufficient information to
shape its sectional properties end details. Taking this next step would require
that the Place Holders become
spatially more sophisticated and that the truss member
feature use that new information to specify its details.
\begin{bodyNote}
\pbOneCol[r]
{\pbIncludeGraphics[Samples/PlHoTruss/firthofForth_Kenneth_Barker.jpg]{width=\currentWidth}
\source{Kenneth Barker}}
\end{bodyNote}
Download PlHoTrussBeam.gct and PlHoTrussSystem.gct
Paper Folding
Use quadrilaterals
as Place Holders to simulate the
paper folding effects in the following image.
\begin{bodyNote}
\pbOneCol[r]
{\pbIncludeGraphics[Samples/PlHoPaperFolding/PlH0PaperFoldingImage.jpg]{width=\currentWidth}
\source{Zhenyu Qian}}
\end{bodyNote}
Parametrically modeling folded paper is hard. The problem is
physics -- paper has actual dimensions and folds in it
constrain the spatial configurations it can achieve. These
real-world constraints inevitably imply that any model will
require the solution of simultaneous equations, which
propagation-based systems cannot do. (The Goal
Seeker pattern demonstrates a partial solution
to this problem.) That said, approximations can be useful in
design and this sample shows a way to simulate a folded
paper system, ceding from reality some dimensional variation
in the individual panels.
In a folded structure, the pattern of folds can be thought
of as separate from the size and location of the folded
panels. Further, the folding pattern will belong to one of
the $17$ possible symmetry\index{symmetry} groups on
the plane (each group represents one of the fundamentally
different ways of arranging a collection of like motifs on
the plane (\citet[pp. 37-45]{GRUNBAUM1987};
\citet{Weisstein2009WallPaper})). In each such
group, there is a repeating module that imposes geometric
conditions on where the paper edge must be to connect to the
next module. The modeling task splits into three parts: the
paper folds, ensuring geometric connection at the joints and
arranging the resulting module across a surface.
The choice of module is key to clarity and simplicity. This
sample comprises a collection of identical
parallelograms (for symmetry aficiandos, arranged in symmetry group $pmg$ in crystallographic notation). It is
much simpler though to combine parts of six parallelograms\index{parallelogram}
to form a module that has simple translational symmetry
only (symmetry group $p1$). Using two whole and four half
parallelgrams defines a module in which it is easy (or at least,
easier) to relate the geometric boundary conditions to the proxy Place
Holder.
\begin{bodyNote}
\pbOneCol{\input{\GCFigsPath/Patterns/PlaceHolderPaperFoldingCell0.tex}}
\end{bodyNote}
To connect adjacent modules requires coincidence along each
edge and at each vertex at which modules join. Four edge
points connect two modules each and four vertex points
connect four modules each. The edge points are easy: they lie
at edge midpoints on the Place
Holder, so are guaranteed to coincide. Vertex
point coincidence requires that, at each vertex, adjacent
modules share a common vector from the vertex to the module
point. Here, this vector is computed as a global property of
the surface. With slightly more work, the Place
Holder object could hold individual direction vectors\index{vector!direction} at
each of its vertices.
An Organized Collection of Points
using a rectangular grid of the $u$ and
$v$ parameters on a parametric surface
locates a collection of quadrilateral\index{quadrilateral} polygons\index{polygon}. Using these
quadrilaterals as Place Holders,
the surface gets covered by the folded modules and looks
like a folded paper sculpture. It isn't one of course: on a
general surface, edge lengths will differ from the initial
paper and polygons will not be planar. In more constrained
domains it is feasible to model folded paper. For instance,
the Goal Seeker pattern can be
used to find the feasible configurations for folding models
of Persian Rasmi domes\index{Rasmi dome} from single sheets of paper
\cite{Maleki2008A}.
\begin{bodyNote}
\pbTwoCol
{\pbIncludeGraphics[\extImagesPath/Rasmi/MalekiPaperDome.png]{width=\currentWidth/2}}
{\currentWidth/2}
{\pbIncludeGraphics[\extImagesPath/Rasmi/MalekiDome.png]{width=\currentWidth/2}}
{\currentWidth/2}
\figcaption{A dome structure folded from a planar assembly of triangles.
\source{Maryam Maleki}}
\end{bodyNote}
Download PlHoPaperFolding01.gct
and
PlHoPaperFolding02.gct
Mattress Use octagons\index{octagon} and
quadrilaterals\index{quadrilateral} as Place Holders to
simulate the shape of an air mattress.
There are two special features in this sample.
1) There are two types of Place
Holders: the quadrilateral to place the rectangular
pillow and the octagon to place the octagonal pillow.
2) The combined Place Holder is
hierarchical: one simple Place
Holder defines the actual Place
Holders containing both quadrilaterals and
octagons. The first Place Holder
is the familiar one from previous samples: the
quadrilaterals created by $uv$ points
on the surface. This acts as a Place
Holder for placing octagon Place
Holders on face centres and quadrilateral
Place Holders on vertices.
Once the Place Holder structure
is complete, the two different modules are located on each
of the quadrilaterals and octagons respectively.
\begin{bodyNote}
\pbOneCol
{\tikzPlaceHolder[Explanatory figure here]{\currentWidth}{\currentWidth*0.75}}
\end{bodyNote}
Download PlHoSquarePillow.gct, PlHoPolygonPillow.gct and PlHoMattress.gct