Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach...

14
Computer-Aided Design & Applications, 5(1-4), 2008, 483-496 483 Computer-Aided Design and Applications © 2008 CAD Solutions, LLC http://www.cadanda.com Top-Down Archaeology with a Geometric Language Dario Lucia * , Francesco Martire * , Alberto Paoluzzi * and Giorgio Scorzelli * * Università degli Studi “Roma Tre”, {lucia, martire, paoluzzi, scorzell}@dia.uniroma3.it Fig. 1: (a) 2D map of the Palatino hill in Rome; (b) the 3D PLaSM reconstruction of the emperor’s palace (Domus Flavia, Domus Augustana and Hippodrome of Domitian). ABSTRACT In this paper we discuss a fast reconstruction of an archaeological site consisting of many different and connected parts. In particular, we discuss the geometric reconstruction of the Domus Flavia and the Domus Augustana, both built by Emperor Domitian on the Palatine hill in Rome, including the adjacent Hippodromus. The Domus Flavia was the official part of the palace, while the Domus Augustana was the emperor’s luxurious private residence. They are the most impressive ruins remaining today on the Palatine. The aim of this paper is to introduce the reader to the power of generative semantics, and to show how fast and easy is the generation of complex VR models if using a generative language. For this purpose, we capitalize on a novel parallel framework for high- performance solid and geometric modeling, that (a) compiles the generating expressions of the model into a dataflow network of concurrent threads, and (b) splits the model into fragments to be distributed to computational nodes and generated independently. We trust that both the language and its kernel are suitable for Cell-BE (Broadband Engine) implementation, that someone believes the reference architecture for advanced modeling, imaging and simulation of next years. Keywords: VR systems and toolkits, archaeology applications, architectural design, CAD. DOI: 10.3722/cadaps.2008.483-496

Transcript of Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach...

Page 1: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

483

Computer-Aided Design and Applications

© 2008 CAD Solutions, LLChttp://www.cadanda.com

Top-Down Archaeology with a Geometric Language

Dario Lucia*, Francesco Martire*, Alberto Paoluzzi* and Giorgio Scorzelli*

*Università degli Studi “Roma Tre”, {lucia, martire, paoluzzi, scorzell}@dia.uniroma3.it

Fig. 1: (a) 2D map of the Palatino hill in Rome; (b) the 3D PLaSM reconstruction of the emperor’s palace (DomusFlavia, Domus Augustana and Hippodrome of Domitian).

ABSTRACT

In this paper we discuss a fast reconstruction of an archaeological site consisting of many differentand connected parts. In particular, we discuss the geometric reconstruction of the Domus Flavia andthe Domus Augustana, both built by Emperor Domitian on the Palatine hill in Rome, including theadjacent Hippodromus. The Domus Flavia was the official part of the palace, while the DomusAugustana was the emperor’s luxurious private residence. They are the most impressive ruinsremaining today on the Palatine. The aim of this paper is to introduce the reader to the power ofgenerative semantics, and to show how fast and easy is the generation of complex VR models ifusing a generative language. For this purpose, we capitalize on a novel parallel framework for high-performance solid and geometric modeling, that (a) compiles the generating expressions of themodel into a dataflow network of concurrent threads, and (b) splits the model into fragments to bedistributed to computational nodes and generated independently. We trust that both the languageand its kernel are suitable for Cell-BE (Broadband Engine) implementation, that someone believesthe reference architecture for advanced modeling, imaging and simulation of next years.

Keywords: VR systems and toolkits, archaeology applications, architectural design, CAD.DOI: 10.3722/cadaps.2008.483-496

Page 2: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

484

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

1. INTRODUCTIONThe reconstruction of the shape of ancient monuments is normally performed bottom up (see e.g. [8]), by (i)decomposing the building into more or less elementary elements of the building fabric, (ii) elaborating this detailedshape by using some CAD system, (iii) attaching appropriate textures, often derived from actual photographs, andfinally by (iv) assembling the various parts in world coordinates. A last exporting into some standard VR environment,usually VRML, concludes the process. This workflow requires both a great amount of human work and a strongexpertise in reading and interpreting the architectural drawings and the other diagrams used by architects andarchaeologists. Conversely, we discuss here a pretty speedy top-down development approach, that may allow the VRscientist to generate some preliminary models in a very fast way, to use them as the basis for discussion and feedbackwith archaeologists and art historians, and ready to easily import both a main revision of the overall structure and/orlocal adjustments, improvements and further detail. On the way to a plausible and consistent reconstruction, asimulation of different solutions can be very helpful. A whole set of different hypothesis can be realized at every stageof the genesis of the model with only a small amount of extra work.For the RAD (Rapid Application Development) of the Imperial Palace in Rome, to be used as a proof-of-concept forsuch top-down development, we use the geometric language PLaSM and shortly introduce its syntax, semantics anduse modes. PLaSM, (the Programming LAnguage for Solid Modeling) is a design language, strongly influenced by FL(programming at Function Level), a novel approach to functional programming developed by the FunctionalProgramming Group leaded by John Backus and John Williams at the IBM Research Division in Almaden in the firstnineties [2],[3]. PLaSM is a geometric extension of FL, allowing for a powerful algebraic calculus with dimension-independent geometric objects that include polyhedral complexes and parametric polynomial and rational manifolds(curves, surfaces, curved solids, and higher-dimensional objects). In this environment for geometric computations, acomplex shape is generated as an assembly of component shapes, highly dependent from each other, where (a) eachpart may result from computations with other parts, (b) a generating function is associated to each, (c) geometricexpressions may appear as actual parameters of function calls.This functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possiblebetween values of the calculus and expressions of the language. This approach, based on dimension-independentrepresentations with guaranteed geometric validity, leads to a versatile approach to Virtual Reality, supporting classesof objects with varying topology and shape, and also retains the good properties of functional programming. Inparticular, it allows writing program code which is clear, highly concise and self-documenting. The power of thisapproach comes from the use of a number of operators able to combine shapes, mainly parametric curves, to generatea great number of different geometries. Like CSG, it supports a property of closure, so that other operators can beapplied to shapes generated by some expression in the language, resulting in new and more complex shapes.In this approach a very complicated VR model will be described hierarchically and developed either top-down orbottom-up, and even by using some mixed strategy. Using a syntactically validated programming approach the modelupdating becomes easier in both cases: both when the changes concern some specific components and when theyapply to the overall model organization. In either case it is sufficient to update some generative functions at suitablehierarchical levels. We show that program units that are evaluated more frequently are easily abstracted and elegantlyformalized as library operators, and may be reused in other reconstruction projects.Common languages used for virtual reality modeling are either markup data languages like VRML or X3D, orprocedural languages, like Java3D or JavaScript, that may either embed object descriptions based on markuplanguages or being embedded within them. In both cases the emphasis of modeling is put on structured, hierarchicaldata languages that do not have the full power of a Turing-complete language. Conversely, we believe that the onlyway to produce scalable modeling of complex systems like critical infrastructures (say, e.g. government facilities orairports) or multi-scale biosystems, we need a specialized language engine like the TEX environment, that may supportfurther code layers (e.g., LATEX and its packages, and its growing family of specialized binaries) aiming at separatingcontents from presentation, interaction and media. Therefore, this paper has a triple intention: first, it introduces thereader to the extensible semantics of PLaSM, that is reaching its maturity and shows a strong mix of descriptive power,code compactness and versatility; then it shortly discusses the novel data structures in the kernel of version 5; andfinally provides an example of Virtual Reality modeling for the archaeological domain.The design of PLaSM, the open-source Programming Language for Solid Modeling, started in 1992, long time beforethe internet-based access to virtual worlds was even imagined. The second optimized and extended version of thelanguage interpreter, written in Common Lisp, and characterized by a unique multidimensional approach to geometricmodeling [14], was available in 1994. The version 3, extended with animations, colours and cameras, and exportingto Open Inventor and VRML, came in 1999. The following version 4 was completely rewritten in Scheme and C++,with javascripted animations. The novel version 5, introduced here, is being deployed with a fast geometric engine

Page 3: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

485

and with rewriting optimizations in the interpreter, aiming to automatically exploit multi-core processing. The XGP(eXtreme Geometric Processing) engine is using a novel multidimensional decompositive representation, based onprogressive BSP trees [15] and on the Hasse graph of the generated d-complex; at upper level is using HPC(Hierarchical Polyhedral Complex) structures. The language allows for powerful operations, including progressiveBooleans, the Cartesian product of cell complexes, the extraction of their k-skeletons (k = 1,…,d), and the Minkowskisum of a polyhedral complex with parallelotopes, allowing for sweeping and offset. Current extensions aim to encodethe object topology as a sparse matrix, using a tensor representation of the chain complex underlying the celldecomposition [5].

The present-day skyrocketing production of virtual buildings and environments is being pushed by novel applicationsand social networks like Google SketchUp and Second Life. While both such frameworks provide software tools tointeractively create, view, modify and share 3D models on the web, they also require significant user effort to producenon trivial models, and do not easily allow for code refactoring and reusing. A major advance with SketchUp was therecent introduction of a Ruby application programming interface (API) to extend its functionality. This interface allowsusers to create tools, menu items, and other macros, and even automated component generators. An analogousimporting of virtual models into Second Life is allowed by Blender and its Python APIs. Various interpreted languageswere developed for modelling and animation purposes, including BAGS at Brown [17], Obliq-3D at SRC [11], andAlice [4], that uses Python (interfacing Java) as its embedded interpreted language.As well as the very influential Open Inventor toolkit [18] built on OpenGL, all such environments are hierarchical (afterthe ISO PHIGS in the eighties) and object-oriented for fast prototyping purposes. The main difference with ourapproach is that they describe procedurally the shape, whereas, conversely, PLaSM computes the geometry as theresult of evaluation of algebraic expressions, as this paper aims to show. With respect to recent published work onbuilding design using shape grammars [10],[19], the main difference is that our approach may be finalized to theactual reconstruction of a site and of its actual interior shape, even meshed at variable levels of detail, and not only tothe visual simulation of the possible exterior building shells at the town-planning level. “CGA shape, the novel shapegrammar for the procedural modeling of CG architecture, produces building shells with high visual quality andgeometric detail. It produces extensive architectural models for computer games and movies, at low cost”. To tell thismore clearly, the two main differences with the present approach are emphasized: (a) CGA shape is a shape grammar,hence able to generate abstract virtual buildings according to shape generating rules, providing a specified style;conversely PLaSM generates concrete virtual buildings, starting from actual engineering drawings, in this case thephotogrammetry of the archaeologic site; (b) CGA shape produces a photorealistic view of the building shells, i.e. asurface representation of the exterior envelope; conversely, PLaSM produces a solid model with any desired degree ofaccuracy of the interior building, as well as of the exterior envelope. PLaSM is currently being used to modelling real-world critical infrastructures (say, airports or nuclear plants), in order to provide the integration layer for all the datacollected by the various sensor systems, including video-surveillance, presence and RFID tracking, fire and smokealarms, etc.

Further development of the PLaSM geometric kernel has recently introduced (in the new advanced kernel) theattachment of properties, not only predefined (like color-per-vertex or color-per-face or textures, etc), but alsodynamically user-defined, to any geometric value. A new exporting to the new interchange file format for interactive3D applications named Collada [1] that stands for COLLAborative Design Activity, originally created by Sony as theofficial format for the PlayStation 3. The streaming character of the language will fit well with the CUDA (ComputeUnified Device Architecture) environment, the GPGPU technology that allows to code algorithms for execution on theGPU. A next version of the geometric kernel is planned to lay over a CUDA interface. Some preliminary experimentswere already done.

In Section 2 the very basic elements of the PLaSM language syntax and semantics are introduced. In Section 3 weshortly describe the dimension-independent representation schemes used by the language kernel, namely the BSPtrees and the Hasse graph, and briefly introduce our next representation of topology, based on sparse matrices. InSection 4 the extensible character of the language is discussed by giving several simple implementations of usefulextensions. In Section 5 the application of top-down modeling for archaeology is discussed with reference to thereconstruction of the Flavian palaces on the Palatine hill. In the Conclusion section some development directions areoutlined.

Page 4: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

486

2. LANGUAGE SYNTAX AND SEMANTICSAccording to the FL semantics, an arbitrary PLaSM script can be written by using only three programming constructs:

application of a function to the actual value of input parameters, elements of the function domain,producing an output value in the function codomain;

composition of two or more functions, producing the pipelined execution of their reversed sequence (seeFig. 2);

construction of a vector function, allowing for the parallel execution of its component functions.

The model of a PLaSM computation is a directed graph ( , )G N A where the set p dN N N of nodes is

partitioned in two disjoint subsets of programs and data, where a data object may denote either a single value or asequence of values.

The set A of directed arcs is partitioned into three disjoint subsets, a d pA N N denoted as application,

c p pA N N denoted as composition, and e pA N N , denoted as evaluation, respectively. There is no semantic

difference between data and programs. A datum in a given computation can be a program in another computation.The nodes in dN may be visually represented as rounded boxes, those in pN as squared boxes (see Fig. 2).

Primitive objects are characters, numbers, truth values and polyhedral complexes. A polyhedron is a disjoint union ofpolytopes, i.e. of bounded convex sets. Expressions are either primitive objects, functions, applications or sequences.The application expression 1 2exp : expr r applies the function resulting from the evaluation of 1expr on the argument

resulting from the evaluation of 2expr . It may be useful to remember that: (a) binary functions can be also applied in

infix form, as shown below; (b) application has the greatest precedence with respect to other operators, and that (c)application is left-associative.

: 1,3 1 3 4 (0.1)

Composition is pipelining According to the mathematical definition of function composition:

( )( ) ( ( ))f g x f g x requiring that function f applies to the value resulting from the g application to the x value, our

main paradigm, represented in Fig. 2, states that a function composition is a computational pipeline working in thereverse order of the functions to be composed.

Fig. 2: A visual representation of the expression( ) : ( ) : ( : ) : ( : ( : ))f g h x f g h x f g h x .

The construction The combining form CONS allows to apply a sequence of functions to an argument, so producingthe sequence of applications:

1 2 1 2 1 2: , ,..., : [ , ,..., ] : : , : ,..., :n n nCONS f f f x f f f x f x f x f x (0.2)

Partial functions A higher-order curried function of the kind: : : ( )f A B C f A B C can be defined, using

formal parameters, as in Listing (2.3),

( :: )( :: ) _exp

_

;

DEF f a isA b isB body r

WHERE

local env

END

(0.3)

Listing (0.3): Params a and b optional; eval of _expbody r returns its value; _local env hidden outside f .

where isA and isB are (either pre- or user-defined, respectively) predicates used at run-time to test the set-membership of arguments. The function f is applied to actual arguments as : : ( : ) :f x y f x y , and returns a

Page 5: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

487

valuec C . Let notice that the value generated by the expression :f x is a partial function, and remember that

application is left-associative.

3. GEOMETRY ENGINE ARCHITECTUREWe briefly introduce the dimension-independent geometric structures in the kernel of PLaSM 5, where progressiveBSP trees are used for streaming evaluation of geometric expressions [15]. Hasse graphs are used to maintain acomplete representation of the model topology. A novel bi-diagonal block-matrix representation of the chain complexof the model, called Hasse matrix [5], should soon support both the geometric design and the physical simulation.

Progressive BSP trees (PBSP), supporting progressive Boolean operations, are introduced in the V.5 geometric kernel,as a progressive, adaptive and multi-resolution solid representation. Three types of labels are used for leafs: IN (fullcells); OUT (empty cells) and FUZZY (undecided cells). A concept of frontier, defined as a tree-node subset giving aspace partition into convex cells, is needed for this purpose. A frontier is any collection of PBSP nodes such that theircells are a partition of the embedding Euclidean space. A (progressive) refinement, or forward computation, proceedsby splitting some fuzzy cell in the current frontier. A (progressive) cell join, or backward computation, proceeds bygluing a pair of sibling nodes, and returning their parent node. An adaptive local refinement or collapse is alwaysguaranteed by forward or backward moves of the frontier.

Hasse graphs A cell complex K is a collection of compacts subsets of d , called cells, such that: (a) ifc K , then

every face of c is in K ; (b) the intersection of any two cells is either empty or a face of both. A d-polytope is a solid,

convex and bounded subset of d . A polytopal d-complex, or d-mesh, is a cell complex of d-polytopes and their k-faces (0 )k d . A complete representation of a d-mesh is given by the Hasse graph of the cover relation of cells,

whose nodes are the members of the complex K , partially ordered by containment, and where there is an arc fromnode x to node y if: (a) x y and (b) there is no z such that x z y . Hasse graphs are used in the language

kernel as a complete representation of the K topology, that cannot be handled efficiently by BSP trees.

Hasse matrices The Hasse representation of (co)chain complexes [5] is being currently ported to Plasm, with the aim ofsimplifying and making algebraic the interface between domain representation and field computations, providing anadaptive multigrid approach to simulation. As a matter of fact, the (co)chain-complex formalism and the Hasse-matrixrepresentation generalize in a natural and straightforward way to physical modelling. Chains assign measures to cells,measures that may be tuned to represent the physical properties of interest (mass, charge, conductivity, stifness, and soon). Cochains, on the other side, may be used to represent all physical quantities associated to cells via integration withrespect to a measure.

4. DEFINING NEW PRIMITIVESThe PLaSM language is extensible by design. Even the most common graphics primitives (say, polyline and triangle-stripe) may be natively defined in PLaSM, and novel geometric operations can be easily added to the language byputting them in a library. The current libraries contain about 600 functions. We show the implementation of somearchitectural primitives of growing complexity. For a full discussion of the constructs used, the reader is referred to thebook [13]. Notice that both basic operations and library functions are displayed in red.

4.1 ColumnsOur examples of specialized generative primitives start with the columna function, that assemblies a parametric columnin pseudo-Corinthian style. The formal parameters, whose scope covers the function body, i.e. the generatingexpression on right-hand side of the function head as well as the local environment delimited by theWHERE , END

keyword pair, stand respectively for: dm is the circumference diameter at the column basis; h is the column height;

h_base is the height of the column base.The column is assembled by gathering the parts of the object, and by putting each part on the top of the previous ones.In particular, it is composed of a vertical cylndr that is wider at the bottom, two geometric toruses, torus_bot at thebottom, and torus_top at the top of the cylinder, respectively, by two parallelepiped bases base and base_top, and bythe capital, generated by rotated union ( ) of two squared baskets. Truncone and Torus are the PLaSM primitives

Page 6: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

488

for generation of a truncated cone and a torus surface, respectively. The composition with the Join operatortransforms their output from a surface to its solid convex hull. Notice, with respect to the sequence of TOP operationsin the function body, that they are left-associative.

( , , _ :: e ) _

_ _

ln ( : /2,0.8 /2, ) : 24,

_ ( : /12, /2 ) : 8,24 ,

_ (

DEF columna dm h h base isR al baseTOP torus botTOPcylndrTOP

torus topTOPcapitalTOPbase top

WHERE

cy dr JOIN TRUNCONE dm dm h

torus bot JOIN TORUS dm d

torus top JOIN TOR

: 0.8 ( /12),0.8 ( /2) ) : 8,24 ,

( : 1,2 : 7 / 12,7 / 12 ) : 7 /6,7 /6, _ ,

_ ( : 1,2 : 7 / 12,7 / 12 ) :

7 /6,7 /6, /6 ,

( : 0.8 /2

US dm dm

base T dm dm CUBIOD dm dm h base

base top T dm dm CUBIOD

dm dm dm

capital JOIN TRUNCONE dm

,1.2 /2, /8 ) : 4

( : 1,2 : ( /4) : 0.8 /2,1.2 /2, /8 ) : 4

;

dm h

R PI JOIN TRUNCONE dm dm h

END

(0.4)

Listing (0.4): Definition of a column.

Fig. 3: (a) Model generated by instancing the columna function; (b) Arch values generated by the geometricexpression: ( : ( : 3,0.2,0.4 )) : ( : : ( /6)) : (1..6)STRUCT AA Arch AA C PI .

4.2 Archs and DomesThe MAP operator is the constructor of curved parametric geometry. Its semantics can be described as

:MAP coordfuns :domain, where domain d , with 1d for curves, 2d for surfaces, 3d for volume maps,

and so on (higher-dimensional manifolds). The coordfuns parameter is a sequence ix of coordinate functions ix :

domain ,1 i n , where n d is the dimension of the embedding space n of the generated d -manifold.

A valued property of the language PLaSM is that it allows for transfinite implementation of curved parametricgeometry, where the function basis may be combined with vectors of coordinate functions used as control points.An example of the expressive power of the geometric language is shown by the Arch and ArchSurface functions inListings (4.3) and (4.2), that may generate both round (i.e. semicircular) and segmental arcs, with any opening angle.So, the ArchSurface function was first defined, that generates the transfinite blending (linear Bézier interpolation) oftwo “control curves”: circumferences with same center and different radiuses rr and rr w (for width), respectively.

Such a function, when mapped on a 2D interval 1 2 1 2[ , ] [0, ],w , returns a segment of surface arch with angle

2 1 and widthw .

Page 7: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

489

In order to generate a solid arch, the transfinite interpolation is repeated, using now two “control surfaces”, i.e. twoparallel ArchSurf2D translated each other by the vector (depth, 0, 0). The results of the expressions ( : 0K AL

ArchSurf2D ) and ( :K depth AL ArchSurf2D ) where AL stands for append-left so that , , ,x AL y z x y z , are

two 3D vectors of bivariate coordinate functions, that are then used as the two Bézier control “points” to generate athree-variate map, later applied to a proper 3D interval domain to generate the solid arc. The expression :K xtransforms a number x into a constant function with the same value. The formal parameters of the Arch function are:the arc length; the horizontal arc width; the arc depth; the angle, usually given in the ancient architecture as a multipleof /6 (see Fig. 3(b)).

( , :: e ) : 2 : 0, 1

0 : cos 1, : sin 1 ,

1 : ( ) cos 1, : ( ) sin 1

;

DEF ArchSurface rr w isR al Bezier S Circle Circle

WHERE

Circle K rr S K rr S

Circle K rr w S K rr w S

END

(0.5)

Listing (0.5): Definition of an arch surface blending function.

( , , :: e )( :: e ) ( : 3 : ( : ) : ) : 3

( /2)/cos : ( /2),

: 2 : ( : 2 : 2 ),

2 ( : 1 : ( /2) : (

DEF Arch length w depth isR al angle isR al T ceiling MAP SolidMap domain D

WHERE

radius length angle

ceiling MIN MAP ArchSurf D domain D

domain D T angle intervals PI

)) : 16 : 1,

3 2 : 1,

: 3 : 3 _0, 3 _1 ,

2 : , ,

3 _0 : 0 2 ,

3 _1 : 2

;

angle q

domain D domain D q

SolidMap Bezier S Surf D Surf D

ArchSurf D ArchSurface radius w

Surf D K ALArchSurf D

Surf D K depth ALArchSurf D

END

(0.6)

Listing (0.6): Definition of an arch.

Another similar example is given by the function Dome, that generates a dome whose basis equates a regular polygonwith a given number of sides. The generative technique is the same used for the Arch function, i.e. transfinite blendingbetween two translated halfspheres, or better, between their two-variate generative maps. The formal parameters are:the number n of the sides of the basis; the lateral length (diameter); the width of the solid; the solid angle, in order toproduce segmental domes, as for segmental arches.

( :: ) , ,

: 2 1,

: 1 2,

: 1

;

DEF HalfSphere r isRealPos fx fy fz

WHERE

fx K r SIN S COS S

fy K r COS S COS S

fz K r SIN S

END

(4.4)

Listing Error! Reference source not found.: Definition of a half sphere blending function.

Page 8: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

490

Fig. 4: Dome instance view with exploded cells. The reader should remember that the PLaSM internal representation isdecompositive, so that a cellular decomposition of the model is natively available.

( :: )( , , :: ) ( : 3 : ( : ) : ) : 3

/(2 cos : ),

: 3 : 1,

: 3 : 3 _0, 3 _1 ,

3 _0 : ,

DEF Dome n isNat length w angle isReal T ceiling MAP SolidMap domain D

WHERE

radius length angle

ceiling MIN dome

SolidMap Bezier S Surf D Surf D

Surf D HalfSphere radius

3 _1 : ( ),

2 ( : 1 : ( ) : ( )) : 12 : (2 ) : ,

3 2 : 1

;

Surf D HalfSphere radius w

domain D T angle ntervals PI angle ntervals PI n

domain D domain D q

END

i i

(0.7)

Listing (0.7): Definition of a dome generative function.

4.3 TrussA truss is a structure comprising one or more triangular units constructed with straight slender members whose ends areconnected at joints. A plane truss is one where all the members and joints lie within a 2-dimensional plane. The Trussfunction in Listing (4.6) defines a space truss of given length and height h.The solid truss is produced from the wire-frame model by applying an operation :offset x, y, z , where x, y, z

respectively denote the 3 dimensions of the cuboid that slides on the wire-frame to produce the offset members of theinstanced truss. Notice that 2D verts in the expression ( ) :MKPOL verts, cells, pols produce a normalized wire

frame in 2D, that is embedded into the 0y subspace by the function : [ 1, : 0, 2]MAP S K S , scaled to the actual

dimensions by the affine transformation : 1,3 :S length/12, h/4 , and finally made solid by the function

:offset x, y, z .

Fig. 5: Wire frame and offset truss instances.

Page 9: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

491

( , :: )( , , :: ) ( : , , : 1,3 : /12, /4

: [ 1, : 0, 2] ) : , ,

6,0 , 3,0 , 3,2 , 0,0 , 0,4 , 3,0 , 3,2 , 6,0 ,

1,2 ,

DEF truss length h isReal x y z isReal offset x y z S length h

MAP S K S MKPOL verts cells pols

WHERE

verts

cells

1,3 , 2,3 , 2,4 , 3,4 , 3,5 , 4,5 ,

4,6 , 4,7 , 5,7 , 6,7 , 6,8 , 7,8 ,

: : (1..13)

;

pols aa list

END

(0.8)

Listing (0.8): Definition of a truss generative function.

A truss instance is shown in Fig. 5, where both the reference wire frame model and the offset model are given. Noticethat they contain 13 members (pols), each one defined as the convex hull of two vertices (cells), and 8 joints (pairs ofcoordinates in verts).

4.4 RoofThe function RoofAngled, shown in Listing (4.7), generates a roof segment of trapezoidal shape, with a given angle onthe extreme joint.The function Roof conversely produces a roof with rectangle shape, i.e. a two-dimensional array of tiles. The meaningof the formal parameters of the RoofAngled is: len_x length of roof; len_y width of roof; len_z z-displacement of thehighest side; alpha joint angle.

Fig. 6: Angled roof with half-cylindrical tiles.

( _ :: ;dim_ ,dim_ ,dim_ :: ) ...;

( _ , _ , _ :: ) ...;

( _ , _ , _ , :: ) ( :

[ , : ]) :

DEFTile n x isIntPos x y z isRealPos

DEF Roof len x len y len z isRealPos

DEF RoffAngled len x len y len z alpha isRealPos STRUCT AA DISTR

SPLITCELLS K cubo tiledRoof

WHE

: _ , _ , _ ,

( : 1 : ( : 1 : ( : 2 : / cos : sin : ))

: 1,2 : ( : ) ) :

: 2 : /cos : , : 2 : /cos : , : 2 :

RE

tiledRoof Roof len x len y len z

cubo T SIZE tiledRoof SIZE tiledRoof alpha alpha

R alpha cuboid

SIZE tiledRoof alpha SIZE tiledRoof alpha SIZE tiledRo

;

of

END

(0.9)

Listing (0.9): Definition of a tile, a row of tiles and a roof generative function with assigned angle of join.

4.5 Groin VaultThe function GroinVault, given in Listing (4.8), generates a squared groin vault, also known as a double barrel vault orcross vault. It is a vault produced by the intersection at right angles of two barrel vaults. The real parameters of the

Page 10: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

492

macro are: length of the vault side; w width of walls; opening angle of the vault (usually a multiple of /6pi ). The

coding of the new macro largely exploits the several symmetries that may be found in a groin vault. In particular, thePLaSM expressions ( [ , : 1 : 1]) :STRUCT id S vault4th and ( [ , : 2 : 1]) :STRUCT id S vaultHalf produce a

double instance of the arguments vault4th and vaultHalf, respectively reflected against the 0x and the 0y

planes. Analogously, the vault4th value is generated by assembling the vault8th (i.e. the geometry contained in a1

8of

the reference frame) and its copy reflected against the plane x y . For this purpose is used the mapping produced by

the expression : [ 2, 1, 3]MAP S S S , that just swaps the first and second coordinate of all vertices of its geometric

argument. For reader’s convenience, we remember that the ArchSurface is shown in Listing (0.5).

Fig. 7: Groin vaults of different opening angle.

( , , :: ) ( : 3 : ( : ) [ , : 2 : 1, ]) :

/(2 cos : ),

: 3 : _8 ,

: 3 : _0, _1 ,

_0 : ( /2)

DEFGroinVault length w angle isReal T ceiling STRUCT id S vaultHalf

WHERE

radius length angle

ceiling MIN Vault th

solidMap Bezier S surf surf

surf K length ALar

2 ,

_1 [ 1, 1, 3] : 2 ,

2 : , ,

8 : : 3 ,

3 ( : 1 : ( ) : ( /2 )) : 8 : 1 : 1,

4 ( [ , : [ 2, 1, 3]]) :

chSurf D

surf S S S archSurf D

archSurf D archSurface radius w

vault th MAP solidMap domain D

domain D T angle intervals PI angle q q

vault th STRUCT id MAP S S S vau

8 ,

( [ , : 1 : 1]) : 4

;

lt th

vaultHalf STRUCT id S vault th

END

(0.10)

Listing (0.10): Definition of a generative function of groin vaults with assigned length, angle of join and width.

5. RECONSTRUCTION OF THE FLAVIAN PALACEWe discuss in this section the geometric reconstruction of the Domus Flavia and the Domus Augustana, both built bythe Flavian dynasty (Vespasian, Titus and Domitian) on the Palatine hill in Rome, including the adjacentHippodromus. The Domus Flavia was the official part of the palace, while the Domus Augustana was the emperor’sluxurious private residence. They are the most impressive ruins remaining today on the Palatine.The Flavian Palace, that was built during the reign of the Flavian emperors, and extended and modified by severalemperors, is spread across the Palatine Hill and looks out over the Circus Maximus (see Fig. 8(a)). Immediatelyadjacent to the palace of Severus is the Hippodrome of Domitian. It can be better described as a Greek Stadium, thatis, a venue for foot races. While it is certain that during the Severian period it was used for sporting events, it was mostlikely originally built as a garden shaped like a stadium. The reconstruction project started with searching for

Page 11: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

493

documentation from “Sopraintendenza Archeologica di Roma”, and with the study of some recent reconstruction,including the one of the ”Accademia Germanica di Roma” and related studies [6],[7],[20].

The first step concerned the analysis of the digital records (in TIFF format) of the stereo-photogrammetric maps of thearcheological site (see Fig. 9(a)) using vectorial drawing tools like Adobe’s Illustrator™ so starting a top-downinterpretation process paired with the production of interpretative drawings, being accompanied with zooming andnaming of every zone of the site (see Fig. 9(b) and Fig. 9(c)), to be used as denotations of the PLaSM macros modelingeach and every room and open space of the site.The traced outlines of spaces where exported from Illustrator™ to SVG (Scalable Vector Format) file format, the vectorgraphics open standard for web applications, and hence imported into PLaSM polylines and polygons, by way of asimple text manipulation using Grep expressions, i.e. standard UNIX filters that search and replace through a set of filesfor an arbitrary text pattern, specified through a regular expression. Then a coordinate transformation from integer(pixel) units to standard metric unit was applied, including a change of origin and reflection of the y axis, so defining a

right-handed Cartesian coordinate system with origin set in one of the most visually remarkable points of the map, onthe south-east angle of the Peristylium. A first top-level symbolic model of the whole site was assembled in this stage.The next step consisted in assigning heights and z measures to each zone, using information taken fromphotogrammetries, photographs, archeological and architectural drawings. Both 2.5D and 3D volumetric models wereproduced in this phase, see e.g. Fig. 12, to be later used as containment boxes of model parts developed in localcoordinates. From this point on, only local coordinates were employed to specify the detailed architecture of eachsingle zone. Either affine 3D transformations (specified by 4 affinely independent points, if the containment box isregular) or trilinear maps (specified by the 8 extreme vertices of the containment volumes, if irregular) were used tomap the parts from local to global coordinates.The whole top-down reconstruction process can be summarized as follows:

1. development of a library of parametric architectural primitives, including: semicircular and segmental arches;barrel and groin vaults with various opening angles; architraves and colonnades; columns and savastæ;wooden frames and trusses; exedræ; circular, elliptical, octahedral and squared domes, as well halfdomes;paneled ceilings, etc.

2. analysis of the archeological site and the available geometric information, including stereo-photogrammetricmaps, and ancient relief drawings;

3. tracing out, zooming and labeling of macro zones and single spaces;4. importing of geometric information into the PLaSM language through simple definitions whose body is either

a polyline or a polygon;5. introduction of z local information of both floors and ceilings, producing the containment volumes of the

spaces;6. separate development of microzones in local coordinates, and assembling into macrozones;7. global assembly via either local to global affine transformations or three-linear maps defined by 8

corresponding points.The development process was pretty quick, and required no more that 1.5 man-month, including the development ofthe library of architectural elements. The progress of next archeological projects will be faster and faster while thesystem will be used and the know-how is gathered.

Fig. 8: (a) View, seen from the Circus Maximum, of the Imperial Palace on the Palatine Hill; (b) an archeologicaldrawing of the ruins site, with the Stadium on the right, the Domus Flavia on the bottom and the Domus Augustana onthe top.

Page 12: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

494

Fig. 9: Top-down site analysis: (a) aerophotogrammetric plan of the archeological site; (b) selection and naming ofpalace zones; (c) selection and naming of single spaces in each zone.

Fig. 10: (a) A view of the Inferior Perystilium in the reconstructed palace model (see the yellow area in Fig. 9(c).); (b)an internal view of the Aula Regia (see the green area on top of Figure 9(b)).

Page 13: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

495

Fig. 11: Two top-views of the reconstruction of the site. (a) the whole model from the above; (b) same view with themodel cut at the roof level, to have a picture of the interior reconstruction.

Fig. 12: (a) First development of Nymphæum; (b) Final value of Nymphæum after application of a volume map.

6. CONCLUSIONWe shortly described here the syntax, semantics and use of PLaSM 5, a functional language allowing for a powerfulgeometric calculus as well as for progressive model generation and visualization via data parallelism and pipelinedstreaming.The PLaSM language is leaving its infancy, and looking around for complex applications and people speaking itfluently. Novel virtual reality and simulation frameworks are currently being developed with encouraging perspectives,including modeling and visualization of critical infrastructures and multi-scale modeling of biosystems. Why learningPLaSM? Our answer is: to get first-class descriptive power, exploit next generation hardware, generate models bycoding few lines, test new geometric algorithms in minutes, and finally explore, like a fascinating new world, theisomorphism between the algebra of shapes and the algebra of PLaSM programs.

7. ACKNOWLEDGEMENTSThis project was partially supported by a grant from AlmavivA-CNR to the Department of Informatica e Automazione.The authors would like to thank Alessandra Raffone for kind encouragement and support. Great thanks to present andpast PLaSM developers.

Page 14: Top-Down Archaeology with a Geometric Language1-4)_2008_483-496.pdfThis functional approach implements an algebraic calculus with geometric shapes, where a direct mapping is possible

Computer-Aided Design & Applications, 5(1-4), 2008, 483-496

496

8. REFERENCES[1] Arnaud, R.; Barnes, M.: Collada: sailing the gulf of 3D digital content creation, A.K. Peters LTD, 2006.[2] Backus, J.: Can programming be liberated from the von Neumann style? A functional style and its algebra of

programs, Commun. ACM, 21(8), 1978, 613–641, Turing Award Lecture.[3] Backus, J.; Williams, J.-H.; Wimmers, E.-L.: An introduction to the programming language FL, In Research

topics in functional programming, Addison-Wesley Longman Publ., Boston, MA, USA, 1990, 219–247.[4] Conway, M.; Pausch, R.; Gossweiler, R.; Burnette, T.: Alice: a rapid prototyping system for building virtual

environments, In CHI ’94, New York, NY, USA, 1994, 295–296, ACM Press.[5] DiCarlo, A.; Milicchio, F.; Paoluzzi, A.; Shapiro, V.: Solid and physical modeling with chain complexes, In ACM

Solid and Physical Modeling Symposium, ACM Press, Beijing, China, 2007, ACM SPM 2007.[6] Hoffmann, A.; Wulf, U.: Vorbericht zur bauhistorischen Dokumentation der sogenannten Domus Severiana auf

dem Palatin in Rom, Römische Mitteilungen, 2002, 279–298.[7] Hoffmann, A.; Wulf, U.: Die Kaiserpaläste auf dem Palatin in Rom. Das Zentrum der römischen Welt und seine

Bauten, Zaberns Bildbände zur Archäologie, 2004.[8] Koob, M.: Synagogen in Deutschland. Eine virtuelle Rekonstruktion, Birkhäuser-Verlag, 2004.[9] Lewis, R.; Séquin, C.-H.: Generation of 3D building models from 2D architectural plans, Computer-Aided

Design, 30(10), 1998, 765–779.[10] Müller, P.; Wonka, P.; Haegler, S.; Ulmer, A.; Gool, L.-V.: Procedural modeling of buildings, In SIGGRAPH

’06, pages, New York, NY, USA, 2006, 614–623, ACM Press.[11] Najork, M.-A.; Brown, M.-H.: Obliq-3d: A high-level, fast-turnaround 3d animation system, IEEE Transactions

on Visualization and Computer Graphics, 1(2), 1995, 175–193.[12] Naylor, B.; Amanatides, J.; Thibault, W.: Merging BSP trees yields polyhedral set operations, In SIGGRAPH

’90, New York, NY, USA, 1990, 115–124, ACM Press.[13] Paoluzzi, A.: Geometric Programming for Computer Aided Design, John Wiley & Sons, Chichester, England,

2003.[14] Paoluzzi, A.; Pascucci, V.; Vicentino, M.: Geometric programming: a programming approach to geometric

design, ACM Trans. Graph., 14(3), 1995, 266–306.[15] Scorzelli, G.; Paoluzzi, A.; Pascucci, V.: Parallel solid modeling using BSP dataflow, Journal of Computational

Geometry and Applications, 2007, to appear.[16] So, C.; Baciu, G.; Sun, H.: Reconstruction of 3D virtual buildings from 2D architectural floor plans, In VRST

’98, Proc. of the ACM symposium on Virtual reality software and technology, New York, NY, USA, 1998, 17–23, ACM Press.

[17] Strauss, P.-S.: BAGS: The Brown Animation Generation System, Technical Report CS-88-22, BrownUniversity, Dept. of Computer Science, Providence, RI, 1988.

[18] Wernecke, J.: The Inventor Mentor: Programming Object-Oriented 3d Graphics with Open Inventor, Release 2,Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1993.

[19] Wonka, P.; Wimmer, M.; Sillion, F.; Ribarsky, W.: Instant architecture, In SIGGRAPH ’03, New York, NY, USA,2003, 669–677, ACM Press.

[20] Wulf, U.: Die Kaiserpaläste auf dem Palatin in Rom. Von den bescheidenen Anfängen unter Augustus zumurbanistischen Zentrum eines Weltreiches, Nürnberger Blätter zur Archäologie, 19, 2003, 121–136.