Programming language for solid variational geometry

Programming language for solid variational geometry

Research Programming language for solid variational geometry A Paoluzzi and C Sansoni* PLASM (the Programming L,4nguage for Solid Modeling) is a prot...

2MB Sizes 0 Downloads 13 Views

Research Programming language for solid variational geometry A Paoluzzi and C Sansoni*

PLASM (the Programming L,4nguage for Solid Modeling) is a prototype, htgh-level, user-oriented, functional design language currently under development. A VLaSM 'program' is the symbolic definition of a complex of variational polyhedra, and it therefore allows for the description of a whole set of geometric solutwns to a design problem. In the authors' view, the language could be used, possibly with the assistance of a graphical user interface, in the first steps of the design process and in the detailed design. The preliminary definition of language syntax is discussed. The paper also contains the definition of some new and very powerful sohd operators. design languages, sold modeimo, var~auonal geometry, polyhedral complex, cell decomposttwn, dtmenswn independence

PLASMis an experimental design language which allows the definition and evaluation of the expressions of a special 'calculus on polyhedral It is a pure functional language, where expressions contain operators which map some complexes of polyhedra into other complexes of polyhedra. The language is inspired by the style introduced by Backus languages F P 1'2 a n d F L 3 for programming at function level. PLASU allows the symbolic description of parametric architectural shapes, but the language can also be used for other applications, e.g. to describe the robot, the motion and the environment in the offline programming of robots 4. As the objects and expressions are parametric, the language can generate complex 'variational' objects, as well as perform the automatic mapping between design representations at different detail levels. For example, PLASM can be used to define the 2D parametric layout of a building, as well to generate automatically a 3D Dlpartn-nento dl Informatlca e Slstemlstlca, Umversltfi 'La Sapmnza', Vm BuonarroU 12, 00185 Roma, Italy *Dlpartunento ch Progettazlone Arch e Urb, Umverslt~ 'La Saplenza', Vm Gramscl 53, 00197 Roma, Italy Paper received. 15 August 1991 Accepted 20 January 1992

volume 24 number 7 july 1992

solid model. In particular, the language introduces some powerful new operators for the product, power, offset etc. of complexes of polybedra. A key concept is the introduction of an extension of the traversal operaUon (typical of Pmos-like graphical systems), which allows the full description of structured solid objects wnhout specifying all low-level geometry details. It is also noted that the VLASM operators are dimension-independent, since they are defined for polyhedra of generic dimensions (and not only for 2D or 3D objects). The operators are abstract, as their evaluation is not dependent on the representation of arguments. In an imperative language, a program is a sequence of instructions which implement a mapping between input and output data. To program design methods in an imperative language may be, in the general case, very hard to do, and so problem-oriented languages are needed for design. Various languages s-9 were developed to solve design problems in engineenng areas qmte distant from that of architecture (e.g. the design of mechanisms or electrical networks), and these work by solving a set of simultaneous constraints. In such languages, a 'program' ~s simply a description of functionality and a sequence of constraints (expressed algebraically). An interactive programming environment for sohd modeling with geometrical types and design-database tools was provided by GLIDE and ¢:;LID~.23s'39. TGMS, developed at IBM Yorktown 4°, prowdes a geometrical object-oriented language for writing applications that use sohd modehng. This system, which is similar in some ways to that described in th~s paper, uses AML/X, a language designed at IBM for applications in design and manufactunng¢1, as the base language, and it uses the GDP sohd modeler42 to perform solid operations. PLASM'S aim is to g~ve support for the description of geometrical solutions to shape-design problems (in general by producing 'solid' models), and to allow for automatic transformation between design descriptions at d~fferent detail levels. A 'program' is, m this case, a parametric shape description, given as a set of definitions.

0010-4485/92/070349-18 © 1992 Butterworth-Hememann Ltd

349

A Paoluzz~ and C Sansonl

When the program xs apphed to specific values of parameters, a geometric model of the designed shape ~s produced. A natural choice was to adopt an apphcatwe style of programming, by evaluating the expressions of a specml 'calculus' over polyhedra PLASM IS planned to be used both by apphcatlon programmers, who can define new high-level operators by writing language scripts, and by designers, who can evaluate predefined functions m hbrary packages, or lnteractwely mstantmte language constructs with the md of a user-oriented graphical interface, which must allow for bidirectional echoing between a language window and a graphical window The development of PLASMIS one of the research hnes of the CAD group at the Dlpartlmento dl Informatxca e Slstemlstlca, Umvers~th ' La Saplenza', Italy After hawng developed the polyhedral solid modeler MINERVA~°, the group ~s currently working on methods for the representation and mampulat~on of polyhedra of generic &mens~ons ~ Such an approach allows, in fact, the treatment m a unified manner of several geometric problems 4 The paper ~s orgamzed as follows. First, some mare approaches to the use of computers m design are reviewed and compared w~th the programming approach proposed m this paper, then, the language syntax and operational semantics are outhned, showing the apphcatwe style of the language and some low-level predefined functions. A strong emphasis should be given to the fact that most of the PLASMfunctions are reducible to the evaluation of the STRUCTfunction, 1 e to the traversal of a structure Some new h~gh-level operators on polyhedra are then introduced, and some s~mple examples are d~scussed, with the a~m of h~ghhghting the expresswe power of the language. In the conclusions, some critical ~ssues and open problems are outhned.

GEOMETRIC MODELING AND BUILDING DESIGN The authors' mare claim 1s that architectural design can be enhanced ff specafic tools for geometric control of shape are provided a2-15

Current systems approach

versus

programming

The current systems used m architectural design can be classxfied into two broad categories • 2D drafttn 0 systems The mare md that 2D drafting systems give is the possibility of hierarchically orgamzmg the design into groups and levels. Such systems are the most diffuse in the professional atehers because they do not essentially change the classical practice of the architect's work. • 3D e&tm O and rendermo systems These systems are used to perform 3D projections, to produce h~dden-surface-removed v~ews, and, more recently, to render reahstlcally the design volumes and the external envelopes, as welt to real~.e eleetromc walk-throughs.

350

3D systems are qmte weak from the modehng point of wew, as they need a lot of data and a great deal of human work m order to define the model to be rendered. Therefore, they are used mainly m the final stage of the design process, as any change to the model may become very expenswe and hard to do The best current systems are highly interactive, and they use data structures which are transparent to the user The authors want, conversely, to offer a programming environment to the architect, allowing the symbohc definmon of the design geometry, as well as the tracing of any (geometrical) decision which influences the generation of the shape The use of a specml-purpose language makes the user free from emulating the drafting process, further, this may sUmulate the architect's creatwlty, as it allows for the fast exploration of several design solutions

Solids and voids in architectural design Current CAADsystems disregard the important fact that the design geometry as conditioned by void and solid parts at the same time. Often, for example m modern and contemporary architecture, the design shape is determined by the empty-space definition more than by the envelopes of the space A bmlding can be seen, m fact, as a container of spaces, where the internal partmons determine the configuration of inner spaces, while the external envelope determines the volume as a whole. The designer needs, therefore, to have contemporary control of both void and full subsets of space (see Figure 1 ). In the first desxgn stages, the architect ~s usually interested in the definition of the design volumes, which are subsequently detailed by specifying a hierarchical partmonmg of spaces. In this, the designer attention ~s mainly de&cated to the defimtlon of the general characteristics of the shape; the external envelope and the subdivisions of internal space may be assumed to be 'a&menslonal' Useful tools for this purpose are Boolean operators and affine transformations over 'variational geometries', 1 e no complete and precxse specifications of metric qualities of spaces and precise specifications of wall geometries. When the object as a whole ~s already defined as a set of possibly mterpenetratmg volumes, and external constraints are satisfied, at is possible to define the internal subdwlslons by hierarchically partltlonmg the parent volumes and by using an a&menslonal geometry approach (see Figure 2). In this case, the designer attenUon is dedicated to the shape as a whole, the need is evident for tools that are able to mampulate the shape

Figure 1. Sohds and voids at two destgn stages computer-aided design

Programming language for sohd vanatlonal geometry

a

b

C

Figure 2. Design development,

(a) design development by top-down refinement wtth extenswe use of affine transformations, ( b ) bottom-up approach to desi#n development by component assembly, ( c) top-down approach to design development by successive refinements by affine transformations and set operations, without explicitly requiring the complete specification of the geometry of the internal partitions. March and Steadman 16 have shown since the early 1970s how affine transformations are often applied to architectural design. Such an approach can be easily modeled by allowing the design language to contain a structure-definition mechamsm analogous to that given by the PHIGS graphics standard 17.

Top-down and bo#om-up approach In the first design stages, it is usual to choose a top-down approach and to work by successive refinements CAt) systems usually organize, in a hmrarchlcal way, s~mple elements to generate complex mechanisms, using a bottom-up approach An architectural design, conversely, is usually developed by using a top-down approach 18. Thin approach is closer to the way the

volume 24 number 7 july 1992

human mind imagines the shape. The synthetic moment is always preeminent in the work of a good designer, and it is characterized by an a prtori definition of a shape solving the design problem as a whole, and by a successive detailing of this shape, in order to satisfy all the design constraints Actually, to do a good job, both approaches to geometry definmon are needed, 1 e. libraries of reusable and variational components and tools to perform shape instancing and detailing are both needed. Further, both bottom-up and top-down styles must be freely integrated, depending on the design problem and on the design methods and stages.

Variational and rule-based approach The use of rules in architecture is a very ancient practice, the rules which control the ratios between the parts of temples as a function of the column diameter are an

351

A Paoluzzl and C Sansonl

eloquent example 192° In the same way, in the modern-archatecture age, Le Corbusler 21 used his Modulor, and based shape rauos on the golden section and Flbonaccl's seraes m order to obtain a harmomc control of proportions A parametrac representaUon, also denoted as 'pnmatwe instancing' in Reference 22, is defined as a procedure which generates a shape instance depending on the values of a predefined set of parameters Often, at is necessary to modify a prevaously defined object, where the change must affect (recurswely) all the adjacent objects. A solution to this problem is gwen by vanataonal geometry23, originating m the mechamcal-desagn domain, by assuming geometracal constraints between object parts The explac]t definmon of the shape, usual m current graphacal systems, needs the enumerataon of the (either absolute or relative) posmon of objects' vertices Conversely, the variational approach is ~mphcat, as it contains constraints and not (only) coordinates Therefore, a variational definition makes the objects have some expllc]t degrees of freedom. This representataon as a very powerful design aid, as a parametric defimUon allows one to explore easily the consequences on the whole object that are reduced by a change m a part 'Design by constraant' as an ]mportant rule-based design methodology24 where whole classes of desagn soluuon are lmphcatly defined The front vaew and the structural grid of a building are two examples of shapes where the final configuration can be defined wath dimensional rules. It as possible to introduce an a varlataonal PLASMdefimtaon many 'rules of composmon', both as conditional constructs IF:(cond, exprl, expr2), and as relataonal, logacal or type constraints that the objects or the parameters must satisfy, and whach express posataonal or dlmensxonal relataonshaps between the parts of a structured object In the followang, the term 'varaaUonal' object is used to denote an expression where e~ther affine transformatxons or component objects or both may depend on some parameters, and where exphcat constraints between parameters may be given, and, in thas case, be satisfied by any object instance As wall be shown an the paper, the symbohc representation contained an a PLASM script can be consadered a variational machinery any tame that at contains a set of formal parameters (on the left-hand sade of definitions).

PLASM

approach

PLASM(the Programming LAnguage for Sohd Modehng) is an experimental language for the symbohc descnptlon of vanatlonal polyhedral complexes. The language domain is restricted to linear polyhedra, as curved objects can always be approximated by piecewise-hnear polyhedra Several operators are specialtzed for the archatectural design domain. Using predefined operators, the user can develop his/her own higher-level arc~tectural operators. For example, it is possible to implement several compositions of symmetry and series, as well as operators which result, when they are applied to specific

352

data and evaluated, m specific parts of the budding fabric (such as the staircases or the structural grid) The geometry of a PLASM object as described by instancing predefined operators, eather contained m external labrarles or user-defined A complex object is defined by bmldang a new definatlon. This can be done m several ways, e g. (a) by specifying a 1D complex (which is a graph containing vertaces and edges), (b) by specifying a 2D parametric complex (whach as the plane partatlon reduced by a 1D complex), (c) by evaluating the boundary of the cells of the 3D complex generated by the extrusion of a 2D complex, and (d) by defining a structure containing operators, elementary objects and affine transformations of substructures With PLASMat lS possible (a) to work m a trad~taonal way by developing plan and sectaon drawings (and then to generate automatically a 3D model of the building by using some specmhzed operators, as w]ll be described in the paper ), (b) to assemble directly 3D sohd components, and (c) to integrate the two techniques depending on the problem and on the chosen desagn style In the authors' view, PLASMmay constitute the kernel of specmhzed macrolanguages for different areas of architectural desagn (housing, hospitals, architecture of interiors etc ), also, ]t might be used to produce personalized packages where recurrent cho]ces and stylemes of the desagner are registered It is noticed that such an approach coheres with the tendency to define specml-purpose languages m areas where apphcatlon programs were used before The reason is that such languages enable the user to build specafic applications in a much more powerful and flexible way Examples of this trend are the POSTSCRIPTlanguage for the descrlptaon of hlgh-quahty text pages, TeX 25 and LaTeX 26 for electronic typesetting, MATHEMATICA27 for symbohc c o m p u t a t i o n , RENDERMAN 28 f o r reahstlc rendering, and many others For example a similar approach has been adopted for the defimt~on of new standards for computer graphacs 29-31 Summmg up, the authors beheve that the programmlng approach with the PLASMlanguage may gave a very flexible and powerful aad to design development In particular, both a bottom-up approach, based on component assembly, and a top-down approach, based on model refinement, as well as any kinds of mLxed strategy of design development could be freely chosen by the desagner

SYNTACTICAL NOTES A PLASMexpression may contain operators, sequences, atoms and parentheses (to make exphclt or modify the order of evaluation of the expression). A PLASMscript Is a sequence of definitions separated by commas. A definition may concern expressions or operators. Both contain a left-hand and a right-hand part separated by the symbol = The right-hand part of a definition always contains an expressaon. A definition may also contain an optional script which has the defimtlon as its scope. Atom]c objects belong to simple types Simple types are the Booleans ~OL, the reals REAL,the integers INT,

computer-a~ded design

Programming language for sohd vanahonal geometry the affine transformations T~NSF and the polyhedra POL. Sequences are ordered multisets of PLASM objects or expressions, enclosed within pairs of angle delimiters ( and ). Structures are applications ofthe STRUCToperator, defined on ordered sequences of transformations and polyhedra: STRUCT" (TRANSFL)POL)* --* POL

The types a~ANSF and POE are partitioned in subtypes of objects with a given dimension, denoted by a positive integer. That is, transformations and polyhedra may be 0,1,2,3 ..... n-dimensional. The 0D cells of a polyhedron in ~, are nD points, which are represented as sequences of n reals. An nD affine transformation in TRANSF~ is an (n + 1)(n + l) nonsingular matrix, internally represented (when the dimensions are given) as a sequence of sequences of reals. An operator is a mapping from the product set of domains of parameters to the output domain. The language contains a special form for the definition of operators, consisting of (a) the reserved word Def, (b) the operator identifier, (c) an optional expression, usually a sequence of integers, which gives a further specification to the operator, enclosed within single or double braces, (d) the optional sequence of formal parameters, enclosed within parentheses, (e) the reserved symbol = , (f) a PLASMexpression used to evaluate the operator, (g) an optional script, enclosed between the reserved words Where and End, (h) the optional sequence of default values for parameters, between the reserved words Default and End. The single or double braces around the optional parameters specify the reduction rule that must be used when the operator is applied with more than one optional parameter

Application rules and combining forms An operator (a function) is normally invoked in prefix form by applying its identifier to an actual parameter. The application, denoted by exprl:expr2, applies the value of exprl (a function) to the value of expr2. The infix form is allowed for binary operators. Actual parameters must coincide in order and type with formal parameters given in the right-hand side of the definition of the operator. Some parameters may be not given in the actual parameter sequence (but given the corresponding comma pairs). In this case, the default values of such parameters are used in the evaluation process. Expressions or names of expressions within the current scope can be used in the application When a binary operator is applied to more than two arguments, it is recursively evaluated using the following equivalence: binop.(xl . . . . . xm, x n ) = binop. (binop: (xl . . . . xm), x n ) According to FL, two specaal combining forms are used to apply (a) a sequence of functions to the same argument, and (b) a function to every element of a

volume 24 number 7 luly 1992

sequence argument: lop 1, op2 . . . . , opn]: x = (op 1: x, op2: x . . . . . opn: x) ~: o p : ( x l , x2 . . . . . x n ) = (op:xl,op:x2 . . . . . op:xn) The ~. op (apply-to-all) function evaluates to error when applied to an atom. Some operators have been defined by using an optional sequence of integers enclosed within single or double braces, which usually specify the subset of coordinates affected by the operator. The evaluation process can be regarded as op{il,

, m} = op{d} o op{~2,..., m}

when op has been defined with Def op{{i}} ; else if op has been defined with Def op{i}, then the following reduction rule applies op{il . . . . . in} = [op{d},op{i2} . . . . . op{in}] The first reduction rule apphes, for example, to the transformations T, R, S, H or to the CENXREfunction defined in the next section; the second rule applies, for example, to the functions ~N, UAX, MED. Notice that, in the application of a sequence of optional parameters, only the single pair of braces is used. Binary composition of functions is allowed An infix symbol o must be provided in this case. (op2 o opl):x = op2:(opl'x)

Transformations The elementary affine transformations, i.e. translation (T), scaling (S), rotation (R) and shearing (H), could be seen as maps (REAL)* X POLn"~POL n, where POLn denotes the set of polyhedra of dimension n. In VLASM, they are, instead, considered as maps from a space of real parameters to the space of squared invertible matrices. For example, the translation in the direction x,, which depends on one real parameter, is represented by a squared matnx of unknown dimensions (which are fixed only at traversal time). Such an object is syntactically expressed as T{n}:a, where the positive integer n denotes the nth coordinate, and the real a is the transformation parameter. Transformations are applied to polyhedra by using structures, as described in the next section For example, the translation T{n} :a is applied to the polyhedron P by evaluating the expression STRUCT.( T {n } a,P ). The effect of the evaluation of such an expression is that of summing the real number a to the nth coordinate of P vertices. Predefined operations on transformations are the binary composition o, the unary inverse, and the standard identity ID'x = x (which applies to PLASMexpressions of any type).

Polyhedra A polyhedral complex P is defined as a set of polyhedral cells such that • If p e P, then any face of p is in P. • If p, q E P, then either their intersection is empty, or it coincides with both the intersection of their boundaries and the union of a P subset

353

A Paoluzzl and C Sansonl The set of polyhedral complexes of intrinsic dimensaon l embedded in ~" is denoted as ~ " " The intrinsic damensmn of a polyhedron is the dimensmn of the maximal simphces contained in at, the &mensaon of the embedding space coincides with the number of coordinates of vertices The type polyhedron POL is the set of all polyhedral complexes, together wath a set of operators and a set of constants Predefined operations on polyhedra are • the regularized set operations (operators are overloaded) union ( + ) , intersection (&), difference ( \ ) and unary complementanon ( - ) , which are defined in a dimension-independent way 4, • the extrusion 4"al EXTR, defined as EXTR

Predefined constants are the empty polyhedron EMPTYP and the standard slmplices s{ n}, where s { n} is defined as the convex combination of the n + 1 points , 0 ) , (1, 0,

,0),

CONS ( x , ( x l , TAIL ( x l ,

, xn)) = (x, xl, , x n ) = (~2,

, (0,0,

,1)

In VLASM, there is no external (symbolic) representation of polyhedra with special language constructs Each polyhedron m VOL can be generated by evaluating some language expression. Some predefined operators allow the i n p u t / o u t p u t of polyhedra f r o m / t o external text files using a suitable format specification, e.g. the 'winged representation' described in References 11 and 32. The internal representation of polyhedra in VLASMaS planned to be decompositive, where each polyhedral cell is represented as a set of quasidisjoint convex sets Other internal representations are possible, e.g slmplicIal decompositions of either the boundary 1° or the i n t e r i o r 32'33 o r that are boundary-recursive 34

SOME PREDEFINED OPERATORS

MKSEQ and MKPOL are sequence and polyhedra constructors, respectively The first, when applied to an atom of type POL (polyhedral complex), returns the sequence of its higher-order cells, the second, when applied to a sequence of quasidlsjomt polyhedra of the same order, returns the corresponding complex as an atom

S t r u c t u r e is the authors' denotation for the expression STRUCT "expr, where STRUCTiS a predefined function, and expr is a sequence of transformations, polyhedra and invocations of the function STRUCT. The evaluation of a STRUCT function IS called the t r a v e r s a l of a structure. The result of a structure traversal is a polyhedral complex, possibly nonconnected or even empty. Each polyhedral component of the sequence is called a s u b s t r u c t u r e The STRUCT operator allows the definition of hierarchical objects The domain of such an operator IS very close to the set of PHIGS structures, with two main differences. First, all the substructures must have the same dimension, for example, mixing polyhnes with polygons is not allowed Second, an implicit Boolean operation (progressive difference) is introduced between the substructures. In particular, the default evaluation of the polyhedron P = STRUCT.(xl, X2, .,xm, x n ) , where xl, , x n are polyhedral expressions, is

P = =

x2 , xm, xn) = MKPOL ( x l , \ . ( X 2 , x l ) , ,\ (xn, xm, , x2, xl ) ) STRUCT ( X 1 ,

where the \ function denotes a Boolean difference operation. When some transformations T~, T), , Tk are contained in the sequence to which the STRUCT function IS applied, the following reduction rules apply STRUCT (Tz, x p . . . . . = STRUCT ( T I , x p ,

( T k , xr,

Basic functions The functions sl, s2, , sn select, respectively, the first, second and nth element of a sequence, • : SEL applied to a sequence of integers evaluates to the sequence of corresponding selector functmns, 1.e , SEL ( 1 n) = ( s l, s2, , s n ) , where the primitive infix function as the integer-interval constructor

(d,m)=(tl,

tl + 1,.

,m-

1, m)

Following FL, IF ( p , f , g )

x=

f x ifp x = true 9 x lfp x = false

NOV IS a function which has no effect, i.e. returns notlung, for any argument, I D ' x = x, for any x, is the standard

354

,xn) , xn)

Structure and traversal

~m,n ~ ~ m + l,n + l

where (EXTR{ d} .P) maps P to the Cartesian product P × [0,d], where [0,d] is an interval of the real axes, the expression with the default specaficanon EXTR'P instead evaluates to P x [0,1], • the specialized operators described m the following sections

(0,0,

identity function. K 1S the constant functaon, defined as (K x) y = x for any y, CARD gives the integer cardmahty of a sequence. CONSIS the usual sequence constructor, and TAIL removes the first element of a sequence

Tj, xq,

, Tk, xr ....

, STRUCT.(TJ, xq,

xs ) = ., STRUCT.

,xs)))

STRUCT ( T k , x r ,

, xs) =

= STRUCT ( S T R U C T ( T k , x r ) ,

,STRUCT'(Tk, xs))

Finally, with x r , x s e VOL and Tk ~ TRANSF, STRUCT ( T k ) = N O P , STRUCT ( x r ) = x r , STRUCT (Tk, x r ) = x s where x s is obtained by applying Tk to every vertex in x r . Notice that this evaluation mechanism has the same semantics as the traversal of PHIGS structures or other popular handling mechanisms of local coordinates in similar graphics systems. C o m m a n d s such as p u s h m a t n x or p o p m a t n x in the Silicon Graphics G L library are, for example, lmplementable in PLASM simply by opening or closing a STRUCT application

computer-aided desagn

Programming language for sohd variational geometry Structures have a central role in the PLASM language, as follows, in particular. • Structures do not allow the interpenetration of solids. Hence, if used smartly, they allow the user to define complex geometrical objects without explicitly defining the low-level geometrical details, as can be seen in Figure 3, which contains the object resulting from a STRUCTfunction evaluatmn, after the execution of implicit &fferences between substructures Notice that a different order in the sequencing of substructures may result in very different evaluated objects (see Figures 3b and c). • They give the language the same expresswe power as PHIGS, as (a) the parts of an object can be defined in local modehng coordinates, and (b) the object parts can be instanced many times in different locations by simply inserting their name after proper transformation matrices. • Both the previous properUes result in a very natural and powerful way of modeling the building objects, which are always strongly structured and with some variable amount of shape iteration. Some examples of the use of structures are gwen m the following sections. Other examples can be found in Reference 35.

Sizing and positioning In this subsection, some primitive and nonprimltlVe operators are discussed. The latter are of general usefulness, and will therefore be stored in PLASM permanent packages. The applications MAX{~}:x, MIN{~}:X, MED{Z}:X evaluate to the maximum, minimum or medium value of the ith coordinate of the argument expression x The default forms MAX.X, MIN:X and MED:X evaluate to the full sequence of coordinates of the specified x point. The function SIZE, which returns the sequence of measures along a specified subset of coordinates (remember the application rules w~th optional parameters), ~s defined as Def SIZE{l} = --° ['MAX{ l},MIN{l} ] The function Box is defined as follows, where the result is an object of type OOL Def Box{d .. m} (x : : lsPol) = STRUCT o [T{tl in}oMIN(d . m}, *o 0c. %SIZE{d. l n } ] . x where ~ : " ( x l , . , x n ) = ( " x l , " x 2 , . , " x n ) generates a sequence of 1D polyhedra corresponding to some edges of the containment box. The " constructor and the • product function are described in the following sections. When Box is applied to a polyhedral expression, l e Box{il in} :x, the mimmal nD paralleloplped, oriented as the reference frame, is returned that contains the projection ofx in the subspace of coordinates x l , ., xn. The apphcatlon CENTgE:X applies a translation to the x expressmn, m such a way that its results are referred to an origin located at the centrold of its containment box. This function can be defined as Def CENTRE{{I}} (X . l s P o l ) = STRUCT° [-T{z} o --MED{Z}, I D ] . x =

a

b

C

Figure 3. Evaluated structure defined by four objects, each one contammo two parallelopipeds ; ( a ) structure definition as sequence of isothetlc mterpenetratmo paralleloptpeds, ( b ) VLASM evaluated expresswn srRucT": (Beams, Roofs, Enclosures, Partitions), assumino that each substructure is oiven in worm coordinates, (c) VLASM evaluated expression srRvcr" (Beams, Partitions, Enclosures, Roofs)

volume 24 number 7 luly 1992

The apphcat~on of the binary operator ALIGN{(z,MAX, MIN) }:(X 1,X2) is equivalent to the traversal of a structure constituted by the two argument expressions, with a translation in between, which relocates x2 with respect to x l , according to the location directive given in the optional argument sequence. For the function to work properly, x l and x2 must be embedded in the same space (with the same number n of coordinates), and i must range between 1 and n. Each alignment &rectlve must have the form (z,Posl,Pos2), with Posl,Pos2~{MIN,MAX,MED}, and specify the relative location of xl,x2 along the zth coordinate direction, according to the following definmon"

Def ALIGN {{(hPosl,Pos2)}} (xl,x2.:isPol) = ( x l STRUCT"(T{z}. (Posl {i} "xl - Pos2{z}.x2),x2)) The expresswe power of the function ALIGN In architectural composmon may be very high, especially when it is used within hierarchical expressions. Figure 4 shows the result of the apphcatmn of this functmn m a simple building front, made with a wall and a window Note that, with a statable use of such a construct, any kind of score can be obtained. Notice also that the

355

A Paoluzzt and C Sansonl Z





N



~MIN>

X



Figure 5. Complex resultingfrom evaluation of expresstons

Stair (10, Step) or Stair





Where Figure 4. Front object for dtfferent values of ahgnment

a = SIZE{1}:Step, b = SlZE{3}:Step, l~
dzrectwe along x dtrectton [-The most useful are hlghhghtedby enclosingthem in a box ] function works properly when applied to a sequence argument with more than two elements. Various specialmed alias can be defined for the ALIGN function. The most useful definitions are the following. Def Top (xl,x2.. IsPol) = STRUCTo ALIGN{(3,MAX,MIN),( 1,MED,MED),(2,MED,MED)} (xl,x2) Def Bottom (xl,x2.. IsPol) = STRUCTo ALIGN{ <3,MIN,MAX),(I,MED,MED),(2,MED,MED)

}

(xl,x2) Def LEFT (xl,x2..IsPol) = saxucro ALIGN{(1,MIN,MAX),(3,MIN,MIN) } ( x l , x 2 ) Def RIGHT(xl,x2. :IsPol) = STRUCTo ALIGN{( 1,MAX,MIN),(3,MIN,MIN) } ( x l , x 2 ) Def uP (xl,x2 IsPol) = STRUCTo ALIGN{(2,MAX,MIN),(3,MIN,MIN)}. ( x l ,X2) Def DOWN (xl,x2 :: IsPol) = STRUCTo ALIGN{(2,MIN,MAX),(3,MIN,MIN)}" (X 1,X2) Analogous

definmons can BOTTOMRIGHT, and so on

be

gwen

for TOPLEFT,

Repeat patterns Two repeat binary functions # : (n,x), # # . (n,sequence) (or n # x and n # #sequence) can be used with the mm of rephcatmg a PLASMexpression or sequence an integral number of times They can be partmularly useful within a " operator instance (&scussed below) or within structures The repeat operators estabhsh the following equivalences (2 # ( 1 , 2 ) , 3 ) = ((1,2),(1,2),3) (4 # 1) = (1,1,1,1) (2 # # ( 1 , F u n . x ) ) = ( 1 , F u n ' x , l , F u n : x )

If Step Is a polyhedron given m local coordinates, then a Stair operator with a variable n number of steps and a variable shape of step can be defined as follows Def Stair (n ":lsInt; Step :: lsPol) = STRUCT:(STRUCT:(S{3} (3/4), Step), ( n - 1) # # STRUCT (T{1,3}.((3/4)a, (3/4)b), Step) )

356

End Default n = 10, Step = MKBOX'(28,80,16) End lsInt and ~sPol are two predefined predicates, used for the type checking of actual parameters. MKBOX (with three parameters) is used as constructor of a 3D box polyhedron. Default values for n and Step are given in the defimtlon, to be used when the corresponding parameters are not instanced or they evaluate to error Default values are also used to perform the graphical echo of the function definmon. The resulting polyhedral complex Is shown in Figure 5.

HIGH-LEVEL OPERATORS ON POLYHEDRA Boundary The boundary operator @ is a mapping, as follows @.~.,m~,-1,m

1 ~
For example, the boundary of a 3D polyhedron is a complex of 2D polyhedra whose support space (umon of cells) comcldes with the set of points which do not belong to the interior or to the exterior of the polyhedron, the boundary of a 2D polyhedron is a 1D complex, 1.e. a set of line segments (see Figure 6b) The boundary of a structure STRUCT'(xl, , xn) may be obtained by evaluating the expression

@ o STRUCT'(X1,

, xn)

Skeletons The r-skeleton K ' of an n-complex P ~ 9 )"'" (n <<.m) Is the maximal regular subcomplex with implicit d i m e n s i o n r. The mapping @r" .~"'' --* . ~ ' "

0 ~< r ~< n

such that @r:P Is the r-skeleton of the polyhedral complex P is called the r extractor. Thus, @0:P denotes the set of P vertmes, and @ 1.P the set of P vertices and

computer-aided demgn

Programming language for sohd vanahonal geometry

I

1

a 1 b II

3 II

12

18

1 II

a

e

I

24

3 II

36

2a

a

N

3 II

I

a/2 I I

12

3 II

1 II

2a

18

1 II

a

I

I

Figure 7. 1D polyhedra generated by 'quoting' sequences

b

of real expresszons, ( a) object obtamed by evaluating the expressions "(3,12,3,24,3,12,3) or Grtdl D (4,3), where Def GrtdlD = "[ s2,3.s1,s2,6.s1,s2,3.s1,s2], ( b ) GrtdlD (6,1), ( c) "[ I D , 2 , I D , - ID/2,2.ID,ID ]. a IS remembered also that s{ 1} is the standard 1D simplex, i.e. the line interval [0,11, so that STRUCT o rs{1}, K : s { 1 } ] :y ........

C

2 2

........

d

Figure 6. Boundaries;

(a) 2-complex Plan, (b) 1complex @ Plan, (c) 1-complex @1 Plan, (d) complex \. ([@1, @]:Plan) (solid hnes) edges, while @2"P is the set of P vertices, edges and faces. F]gure 6 shows the result of the expression \o [ @ l , @ ] : P l a n whmh is equivalent to (@ 1 :Plan) (@: Plan) The function \ denotes in this context a Boolean difference between sets of points having an intnnsic dimension 1D, i.e. less than the dimension of the embedding space (2D) Such objects cannot be considered 'solids'. A set operation between nonsolid objects ]s computed as the union of the results of the same operation between pairs of 'solid' subcomplexes lying in the coinciding subspaces.

Generation of 1D polyhedra The operator " is used to define, easily (using local coordinates) and compactly, 1D polyhedra embedded m the 1D space. Such polyhedra are often used as sets of linear measures by other PLASMoperators. The operator " is defined as a mapping from the set of sequences of nonzero reals. ". ( R - { 0 } ) *

--,

A special form of the syntax allows the writing of "x instead that ":x. Negative parameters are used to introduce empty intervals m the evaluated complex. The semantics of such an operator are, once again, a reduction to a structure traversal : D e f " (x::isSeq) = STRUCT°Ot (IF:(lSPOS, 1 # # [STRUCT o [S{1},K:s{1}], T{1}], T{1}o - ) ) : x where the predicate ~sSeq:x Is true when x is a sequence, and lsPos:y is true when the argument y is positive It

volume 24 number 7 july 1992

where yEREAL, evaluates to the 1D polyhedron whmh covers the mterval [0,y] of the real hne. Figure 7 shows some 1D polyhedra generated by applying" to sequences of real expressions. Some more examples of such an operator are given later in the paper

Product of 10 polyheflra (grid generation) The product operator produces, starting from a sequence of n polyhedral complexes in POLOw POL1, a complex of intrinsic dlmens]on r ~< n, where r is the sum of intnnsic dimension of the arguments. * (xl,x2 . . . . . xn) = x~POL', XI,X2,...,xn~POL OUPOL 1 It is allowed to write the application of this operator in infix form, as the following equaUon holds: ,:(xl,x2,.

, xm,xn) = ( , . ( x l , x 2 . . . . . xm) ) ** xn

where ** denotes the power operation described in the next section (the true reason is that the mathematical definitions of the two operanons coincide). The cells of the output complex of the expression A , B are generated by computing Cartesian products between any pair of cells of the argument complexes :

A * B = { x l x = a x b, a e A , b e B } For example, the hne segments of a 3D grid with cubic cells of side a can be generated as GridEdges.a, where the definition of GndEdges is as follows (see Figure 8 ): Def GndEdges (a:asRealPos)= @1 : ( x . y . z ) Where x = "(4 # a),y = "(5 # a),z = "(4 # a) End Simdarly, the arrangement of polygons shown ]n the exploded view of Figure 8c is obtained as GndFaces'a, where the function GridFaces is defined as follows (m this case without using a ;t style): Def GridFaces = @2 o • o [x,y,z] Where x = "[2 # 2,ID], y = "[3,ID], z = "[3 # ID] End

357

A Paoluzzl and C Sansonl I~

Ix.

"~: "~,

h-,, ~,, ~ 'qpl N I N

N JNBN

"

IINIIN IN

~" l'kJ ;N

NIINIIN NJ I INt I

a

"~j

b

"d " \

'"

p\

"% ,*,

~d "q

\ \

q q q

".,rt

where L2., L3. , L. respectively represent (in local coordinates) the 1D segments of length 2a, 3a, a, P~, P~. P~ are complexes of 1D polyhedra which contam two, one and three relocated instances of L2., L3a, La, respectively, P323 is the 3D complex with solid paralleloplped cells generated by the product of P~, P~, P~, finally, p223 is the 2-skeleton ofp323 (see Figure 8c ) A combined use of the operators " and • is shown in the following (see Figure 9) The 2-complex Plan contains four squares of side a, two squares of a smaller side b, and a rectangle with sides b and 2 a - 2 b = 2 ( a - b) The four bigger squares can be defined as "< a, - b, a > * "( a, a > The central part of the object is given, in world coordinates, as "( - a, b> * "( - b / 2, b, 2(a - b), b> The whole parametric definition may be given, using local modeling coordinates, as Def Plan (a,b lsReal) = STRUCT <" (a, - b,a) *" (a,a), T{ 1,2}. (a,b/2>, "(b> *"(b,2(a-b),b>) Where 0 ~< b, b ~< a End Default b = 24, a = 48 End

c

Figure $. GndEdges; (a) perspectwe mew of edges @1o* (4 # " ( 1 > > of 4D standard hypercube, whtch can also be described as @1"("(1>."(1>."(1>,"(1>), (b) axonometrw mew of object GndEdges I defined in the text, (c) exploded view of arrangement of polygons m R 3 obtamed by evaluatmo the expression GridFaces a It can be useful to trace the evaluation process of the expression GndFaces:a, as follows. GridFaces :a = = @2 o * o [x,y,z] a = = @2 o * ( x .a,y a,z:a) = = @ 2 o , . ( " [ 2 # 2 , I D ] : a , " r 3 , I D ] a, "[3 # ID]:a> = = @2 o * ' ( " [2*ID,2*ID] :a," [3*ID] •a, "[ID,ID,ID]:a> = = @2 o . : ( " ( 2 . I D : a , 2 . I D : a > , " ( 3 . I D : a ) , "(ID'a,ID:a,ID:a> > = = @ 2 0 . : ( " (2a,2a>, " (3a>," (a,a,a) > = = @20 .. (S~UCT' (STRUCT (S{1}'2a,s{1}), T{1} 2a, STRUCT"(S{ 1}"2a,s{ 1}>, T{1}'2a>, STRUCT'
T{1}'3a>, STRUCT"( STRUCT: ( S { 1} : a,s {1}), T{1}.a, STRUCT.(S{1} a,s{1}>,T{lI.a, STRUCT"(S{ 1} :a,s{ 1}), T{1}.a>> = = @ 2o *. (STRUCT. ( L 2,,T{ 1}. 2a,L 2.,T { 1}" 2a >, STRUCT.( L 3,,T{ 1}. 3a), STRUCT"> = = @2 ° * :(STRUCT.(L2a,STRUCT:(T{ 1} :2a,L2. > >, STRUCT" ( L 3 a > ,

STRUCT:(Lo,STRUCT" >>> = = @ 2 0 , (PI, P,~, P~> = @2"p323 = P~23

358

Power of polyhedra The power of polyhedra is defined as a mapping from pairs (Basls,Exp> of polyhedra to polyhedra. The Exp argument must have either dimension 0 or 1 The power operator ** extrudes the polyhedron B a s ] s e ~ " ' " into R m+l if the polyhedron Exp is in ~ t , 1 , otherwise, it simply embeds Basis into R "+1. In particular, if Basis and Exp are two polyhedral complexes with proper dimensions, and b x e is the point set obtained as the Cartesian product of two polyhedral cells, **. ~"" x #"1 ~ ~ "+'''+ 1 ze{0, 1} Basis ** Exp = {pip = b x e, beBasls, eeExp}

In Figure 10, two examples of power apphcatlon with the basis Plan are given, showing a multiple embedding of the 2D object Plan in 3D (depending on the real cells of the 0D exponent), and the generation of a multiple instance of a solid (3D) version of Plan (depending on the cells of the 1D exponent). A more complex and interesting example is shown in Figure 11, where the power operator is combined with the 2D skeleton extractor function

--t-- • ---I- b-t--, --t-

a

-""

b

Figure 9. Two instances of parametric complex Plan, corresponding to dtfferent values of parameter a

computer-aided design

Programming language for sohd vanattonal geometry

Intersection of extrusions The intersection of extrusions, denoted with the symbol &&, is an operator from sequences, with a length of at least 2 and at most n, of polyhedral complexes in ~ . - 1 , . - 1 to the polyhedral complexes in ~"'"" &&: ( ~ . - 1,.- 1 )= __. ~ . , .

a

b

Figure 10. Two examples o f power apphcatwn with basis

Plan, (a) polyhedron Plan

** ( @ O ' " ( h , h , h ) ), (b) polyhedron Plan ** " ( w, - (h - w),w, - (h - w),w, - (h - w),w), resultm9 m sohd complex where connected components have wtdth w and are located at dtstance h - w

The expression @2:(Plan ** " ( h , h , h ) ) can be abstracted with respect to h and to the number n of floors : @2 o ** o [ K : P l a n , " o # o [sl, s 2 ] ] : ( n , h ) A more useful abstraction is @2 o ** o I s 3 , " o # o [sl, s2]] :(n, h, P l a n ) and a new operator can be introduced: Def BROCK (xl ":islnt ; x2 ::isReal; x3 :" isPol) = @2 o ** o I x 3 , " o # o [ x l , x 2 ] ] so that the model in Figure 11 can be generated as nLOCK. (3, h, Plan). Obviously, for different values of Plan or h, a completely different 3-floor model may be obtained An extended form of the power operator, which applies parametric transformations to the cells of the resulting complex, is defined in Reference 35. An example of the generation of a spiral stair using two nested instances of the (extended) power operator is also given

2<~m<~n

The arguments of such an operator wall be usually called sections. The infix form is allowed only when applied to two arguments, as the operator IS not associative. The effect of the evaluation of the && operator is a polyhedral complex whose cells are obtained by intersecting, in all the possible ways, the cells of the straight infinite extrusions of the arguments. Such extrusions are computed after having properly embedded (depending on the value of the optional parameter sequence) the arguments into coordinate hyperplanes of the embedding space of the result. For example, the expression & & {3,1}'(Plan, Section), where Plan, S e c t i o n ~ 2'2, is evaluated as follows" the Plan argument is embedded in the plane x3 = 0 of the 3D space, and indefinitely extruded in the x3 direction, while the Section argument is embedded in the plane x l = 0, and indefinitely extruded in the xl direction. The 3D solid polyhedral complex resulting from the operation is finally computed by intersecting the extruded cells in all the possible ways. The 2-skeleton of such a complex, i.e the set of 2D boundary faces of the 3D cells (and the set of their edges and vertices), is graphically represented in Figure 12. See also Figure 13

Lattice of objects The LATTICEbinary operator, used for relocating a set of instances of the same object, optionally depending on the elements of a Boolean array, is useful for defining the structural grid of a building or the set of windows in the building front. The operator is applied as LATTICE { BoolArray }" ( x

1, x2)

and it can also be written in a special infix form. xl ${ BoolArray} x2 where the vertices of x l , x2~POL must have the same number of coordinates The semantics of this operator are those of generating a set of instances of the x2 argument, each one having as its relative origin one of the points (0-cells) in xl. The optional argument BoolArray, an array of Booleans with a one-to-one mapping with the 0-cells of x l , controls the existence of the x2 instances, depending on the truth value of the corresponding BoolArray elements. In more formal terms, it can be written that a LATTICE function is equivalent to the structure given in the following: Def LATTICE ( B o o l A r r a y ; x 1, x2 : lsPol) = STRUCT ° ~X ( I F ' ( s l , INSTANCE, N O P ) ) . P A I R S Where INSTANCE= STRUCT o FT { 1 . CARD : S2 }

Figure 11. Graphwal representatwn o f 2-complex m R 3 9enerated by evaluatmg expresswn @ 2: (Plan ** "(h,h,h) ), where h = distance between adjacent floors

volume 24 number 7 luly 1992

o ( ~ - _ ) o S2, K . x 2 ] PAIRS = (0c o ct'[1 # # SEL:(1 L A S T ) ' ] ) : (BoolArray, @0 :xl ) LAST = MIN o ( C A R D : BoolArray, CARD o @ 0 " x l ) End

359

A Paoluzzi and C Sanson~

8

a

b Figure 13. Intersection of extrusions, (a) Secttonl, Section2 and Plan arguments of a && operation, (b) exploded view of 2D complex generated by expression @2o&& (Section1, Section2, Plan )

b Figure 12. Intersectton of extrustons, (a) Sectmn and

Plan arguments of&& operatton, ( b ) exploded vtew of 2D complex generated by expresston @2o&&{1,3} (Section, Plan ) Restricted offset The OFFSET operator + + generates a polyhedral complex in # " ' " starting from a polyhedral argument in ~ " - 1 , . , called the bas~s of the operator, and from a real number, called the width of the operator" ++

a

b

#~.-1,, x R ~ # " ' "

The OFFSET operator is used to increase the intrinsic &mension of the argument, 1.e. to make it solid. See Figure 14. It is also possible to use an extended form. ++.~.-1,.

x R x ~9~"'"

where the two real arguments are called nght-w]dth and left-width, w~th respect to the internal orientation of the (highest-order) cells of the basis polyhedron It is very easy to compute the oFvs~x function when the base argument is the ( n - 1)-skeleton of a solid complex P e ~ ' " It is possible to show that, in this case,

360

C Figure 14. Offsets, (a) 2D polyhedral complex Plan, (b) 1D complex @1 Plan, (c) polyhedron generated by expresston+ +o@1 Plan

computer-aided design

Programming language for sohd vanahonal geometry

the function can be computed as a Boolean difference between the object + :(~aCSEQ:P), where the expression. represents the Boolean sum applied to the sequence of P cells, and MKSEQ:P, after having suitably enlarged/ shrunk the objects, with a method described in Reference 36. This can be done in a very efficient way when the Internal representation of polyhedral cells is a boundary representation. Def OFFSET (P : : isPol {n - 1, n } ; width :: isReal) = • (CONS(MoveVert {width/2 } o + o MKSEQ: P, MoveVert { - width/2 } o MKSEQ:P ) ) where MoveVert {a } : P computes a new polyhedron with the same topology of P, but w~th vertices obtained as intersections of translated instances of the P faces. Each P face is translated from a real quantity a in the direction of its external normal.

CONCLUSIONS In this paper, the current status of development of the new design language PLASM has been presented. In particular, the most significant decisions about syntax and the semantics of the language have been discussed. Some Important features of the language concern its dimension-independent approach to modeling, its programming approach to variational geometry, the introduction of some new and powerful domain-oriented solid operators, the use of local coordinates for each object definition, and the reduction of most funcUons to the traversal of a structure. The PLASMlanguage is inspired by the very powerful applicative style introduced by the Backus languages FP and FL for programming at function level. When the language is used at a low level, it may appear to be a little cryptic, but it is intended as the kernel of specialized high-level macrolanguages to be used m different areas of architectural design (e.g. housing, hospitals, the architecture of interiors etc.). A more verbose version of the syntax might be useful for the nontechmcal user. The authors believe that a key point for the successful acceptance of the language will be a well des]gned graphical user interface. Such an interface should symbolically trace any graphical action of the designer on the currently selected shape (picking, grouping, cutting, pastmg, dragging etc.), and provide a graphical echo of the expression evaluated in the hstener window Further, the language should be considered as a component of a very high-level graphical environment, with solid modeling, rendering and realtlme visualsimulation subsystems The authors' aim is to prowde standard interfaces for such subsystems, providing at the same time a complete independence of the language, so that it wllr be possible to exploit future hardware and software developments. Tremendous computing power is required for usmg the language in practical cases, but next-generation graphics workstations (more than 50 Mflops for $10 000) are at the door, and parallel machines are already available

volume 24 number 7 july 1992

ACKNOWLEDGEMENTS This work has been supported m part by the PF Edlhzla of the Italian Research Council, under contract CT CNR 90.01702PF64. The authors would like to thank Claudio Gori Giorgi and Ettore Zambelli for encouragement and help in starting the project, Chanderjlt Bajaj, Lmgla Carluccl Aiello and Michael O'Connor for useful discussions and advice, and Lorenzo Saladini for his help in revising the language syntax and making it closer to FL. A first version of th]s paper appeared in the proceedings 36 of CAAD Futures '91. The authors are grateful to the referees for their comments and suggestions. Any errors and lmprecisIons (e.g if the applicative style is used in a naive way) m the paper are the responsibility of the authors. Some of the figures were produced with the solid modeler MINERVA,developed by the CAD Group at the Universlt/i 'La Saplenza', Italy

REFERENCES 1 Backus, J 'Can programming be hberated from the Von Neuman style? A functional style and its algebra of programs' Commun. ACM Vol 21 No 8 (1978) pp 613-641 (ACM Tunng Award Lecture) 2 Williams, J H 'Notes on the FP style of functional programming' in DarUngton, J, Henderson, P and Turner, D A (Eds.) Functional Programming and its Apphcations Cambndge University Press (1982)

3 Baekus, J, Williams, J It, Wimmers, E L, Lucas, P and Aiken, A 'FL language manual - Parts 1 and 2, Research RJ 7100 (67163) Computer Science, IBM Almaden Research Center, USA (1989) 4 Bernardini, F, Ferrueei, V and Paoluzzi, A 'Working with dimension independent polyhedra' Techmcal Report TR-07-91 Dip. Informatica e Sistemlstica, Unlversitfi 'La Sapienza', Italy (1991) 5 Steele, G L 'The definition and implementation of a computer programming language based on constraints' PhD Thesis Stanford, USA (1975) (published as Computer Sctence Department Report STA N- CS- 75-449) 6 Borning, A H 'The programming language aspects of ThingLab, a constraint-oriented slmulaUon laboratory' ACM Trans. Program. Lang. Syst. Vol 3 No 4 (1981) pp 353-387

7 Borning, AH'Definingconstralntsgraphlcally'Proc CHI'86 Conf. (1986) pp 137-143 8 Leler, W M 'Constraint languages for computer aided design' SIGDA Newsletter Vol 15 No 2 (1985) pp 11-15 9 Leler, W M Constraint Programming Languaoes Addison-Wesley, USA (1988)

10 Paoluzzi, A, Ramella, M and Santareili, A 'Boolean algebra over hnear polyhedra' Comput.-Azded Des. Vol 21 No 8 (1989) pp 474-484 361

A Paoluzzl and C Sansonl

11 Ferrucci, V and Paoluzzi, A 'Extrusion and boundary evaluation for multidimensional polyhedra' Comput Atded Des Vol 23 No 1 (1991) pp 40-50 12 Eastman, C M 'The concise structuring of geometric data for CAD' m Kiinger, A, Fu, K S and Kunii, T (Eds.) Data Structures, Computer Graphws and Pattern Recognmon Academic Press, USA (1977)

30 van Liere, R 'Configurable graphics plpehnes' (Mar 1991 ) (unpubhshed report) 31 Larkin, S and Hewitt, W T 'Pnmmves and attributes (revised)' m New AP1 (2nd Ed ) Computer Graphics Unit, Manchester Computing Centre, UK (1991)

13 Kalay, Y E Modehng ObJects and Envzronments Wiley Intersclence, USA (1989)

32 Cattani, C and Paoluzzi, A 'Sohd modelmg in any dimension' Techmcal Report 02-89 Dip Informatlca e Slstemistica, University 'La Sapienza', Italy (1989)

14 Kalay, Y E 'The hybrid edge a topological data structure for vertically integrated geometric modehng' Comput-Azded Des Vol 21 No 3 (1989) pp 130-140

33 Ferrucci, V and Bernardini, F 'SImple_X*n user manual and implementation notes - Parts 1 and 2' Techmcal Report Dip. Informatlca e Slstemistlca, Universlfft 'La Saplenza', Italy (1990)

15 Sehmitt, G 'Classes of design - classes of tools' m McCullough, M, Mitchell, W J and Purcell, P (Eds.) The Electromc Design Studio MIT Press, USA (1990)

34 Rossignac, J R and O'Connor, M A 'SGC" a &menslon-independent model for polntsets with internal structures and incomplete boundaries' m Wozny, M J, Turner J U and Preiss, K (Eds.) Geometrw Modehng for Product Engmeermg NorthHolland (1990) pp 145-180 (Proc 1988 IFIP/NSF Wkshp Geometrw Modelhn9 Rensselaervllle, NY, USA (18-22 Sep 1988)) 35 Paoluzzi, A 'A set of new sohd operators, with CAAD examples' (manuscript)

16 March, L and Steadman, P The Geometry of Environment RIBA Publications, UK (1971) 17 'Programmer's Hierarchical Interactive Graphics System (PHIGS)' ISO DP9592-1 (1987) International Standards Organlsatlon (1987) (Draft Standard )

18 Mitchell, W J, Liggett, R S and Milton, T 'Top-down knowledge-based design' m McCullough, M, Mitchell, W J and Purcell, P (Eds.) The Electromc Destgn Studio MIT Press, USA (1990) 19 Wittkower, R Archttectural Prmctples m the Age of Humamsm Academy Editions, UK (1949) 20 Chitham, R The Classzcal Orders of Archttecture Architectural Press, UK (1985) 21 Le Corbusier Le Modulor Editions de l'Archltecture d'Aujourd'hui, France (1965) 22 Requicha, A A G 'Representations for rigid solids theory, methods and systems' ACM Comput Surv Vol 12 No 4 (1980) pp 437-464 23 Gossard, D C, Zuffante, R P and Sakurai, H 'Representing &menslons, tolerances and features in MCAE systems' IEEE Comput. Graph. & Apphc Vol 8 No 2 (1988) pp 51-59 24 Bafford, L A 'Representing generic sohd models by constraints' Techmcal Report 86-801 Dep. Computer Science, Cornell University, USA (1986) 25 Knuth, D E The TeXbook Addison-Wesley, USA (1984)

36 Paoluzzi, A and Sansoni, C 'Solid modehng of architectural design with PLASM language' Proc CAAD Futures '91 (1-3 Jul 1991) 37 Mitchell, W J The Logw ofArchttecture MIT Press, USA (1990)

38 Eastman, C M and Henrion, M 'GLIDE a language for design reformation systems' Comput Graph. Vol 11 (1977) pp 24-33 39 Eastman, C M 'System facahtles for CAD databases' Proc 17th Design Automation Conf. ACM, USA (1980) pp 50-56

40 Dietrich, W C, Naekman, L R, Sundaresan, C J and Gracer, F 'TGMS. an object-onented system for programming geometry' Soft Practice & Experience Vol 19 No 10 (1989) pp 980-1013 41 Nackman, L R, Lavin, M A, Taylor, R H, Dietrich, W C and Grossman, D D 'AML/X : a programming language for design and manufacturing' Proc Fall Joint Computer Conf. (1986) pp 145-459 42 Wesley, M A, Lozano-P6rez, T, Lieberman, L I, Lavin, M A and Grossman, D D 'A geometric modeling system for automated mechanical assembly' IBMJ Res &Develop Vo124No 1 (1980)pp 64-74

26 Lamport, L LaTeX Addison-Wesley, USA (1986) 27 Wolfram, S Mathemauca Addison-Wesley, USA (1988)

APPENDIX A

28 'The RenderMan interface specification' Pixar, San Rafael, CA, USA (1989)

Temple example

29 'Development of new standards for computer graphics' Workmg Paper ERCIM Consortmm (1991)

In this example, a set of PLASM definitions is discussed with the aim of building incrementally a parametric model of an ancient temple, using Tuscamc order 2°

362

computer-a~ded design

Programming language for sohd variational geometry Notice that this is just an example of the application of the language, and that the proportional ratios between temple components are not accurate. Each definition is given using a local Cartesian-coordinate system Any solid component is built starting from the generalized primitives CUnOID and JOIN. Thus, the function Def Paralleloplped (side 1, side2, side3'' isRealPos ) = C U B O I D : (sldel, side2, side3) Default sldel = 1, side2 = 1, side3 = 1 End when used without parameters gives the standard unit cube with one vertex coinciding with the R 3 origin. Other useful primitives are the paraUelopiped with a squared basis of side Side and height Height, and the truncated 3D cone, which can also be used to generate cylinders: Def SquaredPar (Side,Height :nsRealPos) = Paralleloplped: (Side,Side,Height) Def TruncCone (rl,r2,Height::isRealPos) = JOIN:((Circle'rl) ** 0, (Circle:r2) ** Height) Def Cyl (r,Height::isRealPos) = TruncCone (r,r,Helght) The capital is made by the abacus (parallelopiped w~th squared basis) and echmus (truncated cone), with the proportional ratios given in the following, where d is the basis diameter of the column shaft Def Capital (d:'isRealPos) = TOP:(Echinus,Abacus) Where Def Echinus = TruncCone: (0.85 d/2, d/2, 0.165 d), Def Abacus = SquaredPar:(d, 0.165 d) End where the function TOP, often used in the following, has been already defined as Def Top (Objl,Obj2..IsPol) = saxucro

ALIGN{(3,MAX,MIN),(1,MED,MED), (2,MED,MED)}:(Obj 1,Obj2> In the Tuscamc order, the shaft height is 6.5 times the column diameter

The intercolumnia can be expressed in PLASM as 1D polyhedral complexes (see also Figure 16). Def Plcnostllus (NumCol. isNat; d::lsRealPos) = "((NumCol-1) # # (d, (1 + 1/2)d), d) Where NumCol ) = 2 End Def Eustllus (NumCol"lsNat; d::isRealPos) = " ( ( N u m C o l - 1 ) / 2 # # (d, (2+ 1/4)d, 3d), d) Where NumCol ) = 3 End The range of columns in a temple can be defined by using the LATTICEbinary operator $. Therefore, for the whole colonnade with nl and n2 columns on the x and y sides, respectively" Def Colonnade (nl,n2":IsNat, d"isRealPos) --(@0: (Pmnostilus: ( n 1,d ) * Eustilus. (n2,d)** o) $ Column:d In this case, as the lattice of relative origins is 2D, while Column is 3D, it is assumed that the translation vectors which relocate the instances of Column have z components equal to zero The temple cell contains two walls in two orthogonal directions. A parametric definition is as follows" Def Cell (Hlength,Vlength,Thickness,Height, Depth" "isRealPos) = + ° CENTRE{I,2} (Hwalls,Vwalls) Where Def Hwalls = • o ct." ((Hlength), (Thickness,-Vlength,Thlckness), (Height)), Def Vwalls = • o ~. ": ((Thickness, - Depth,Thickness), (Vlength),(Height)) End At this point, the lesenae must be defined, which constitute the main cell ornament. They are usually realized as squared or circular columns merged into the wall. At this point, the defimtions of two objects, SquaredColumn and CircularColumn, are required. The second is simply an alias for Column; the first can be obtained by the Column definition by substituting all

Def Shaft (d.:IsRealPos) = TruncCone:(d/2, 0.85 d/2, 6.5 d) The column basis is made by assembling two cylinders and a parallelopiped: Def Basis (d:.IsRealPos) = Top:(Phnth,Cyl:(1.34 d/2, 0 165 d>, Cyl.(1.17 d/2, 0.085 d>) Where Plinth = SquaredPar: (I 34 d, 0 25 d) End Thus, the whole column can be defined by assembling Basis, Shaft and Capital (see Figure 15): Def Column (d::IsRealPos) = Top o [Basls,Shaft,Capital]:d Depending on the temple age and settlement, various types of numerical series, called intercolumnia, were used to define distances between pmrs of columns. All such series are parameterized by the column dmmeter d.

volume 24 number 7 luly 1992

I

I

I

I

Figure 15. Column assembly, ( a) objects Basis d, Shaft d and Capital d, ( b ) object Column d= Top ([Basis,Shaft, Capttal] d)

363

A Paoluzz, and C Sansonl

Picnost,lus

d d +d/2 d d +d2 d I I I I I I I I I I I I

S,stdus

I

Dlastllus

I I

Aemstllus

I I

d

2d

I

I

d

d

2d I I

3d

I I

d

3d

I

I!

d

4d

d

4d

I I

2d+1/4d

II

Eustilus

d I i

I

Def ColonnadeWlthCell (d IsReal)= STRUCT ° CENTRE{ 1,2}' ( Colonnade. (7,4 d,Column,BoolArray), Colonnade. (7,4,d,SqColumn,NOT BoolArray), Cell (10d,4d,0 75d,7d,7d) ) Where Def BoolArray = ( ( 7 # 1),2 # (1,5 # 0,1),(7 # 1)) End

d

I

3d

d

I!

I I

Def Steps (nSteps"isNat, d"IsRealPos; Object::isPol) = STRUCT (

a

i

i

I b

I

Figure 16. Intercolumma, (a) vartous types of mtercolummus, ( b ) cell instances of TruncCone wRh SquaredPar. The full PLASM defimtmn of the complex constituted by 7 x 4 CircularColumns, cells and 5 x 2 squared lesenae is given below The plan drawing of such an object is given m Figure 17b. The other configurations of Figure 17 can be easily obtained by just changing the bit configurauon in BoolArray Remember that an implicit subtraction operatmn is performed between the substructures of a structure ! Def Colonnade (nl,n2"'IsNat; d::lsRealPos; Column:'lsPol; BoolArray..lsBool) = @0: (Plcnostilus: (nl,d) • Eustilus: (n2,d)) ${BoolArray) Column'd,

00 00

00 O00 0 0 0 0 0

o 0

0 0 0 0 O00 0 0 0 0 0 0 0

0 ~ 0 0 0 0 0 0 0

0

a

b

0 0 0 0 0 0 0

0

e"--~--~'--¢"-~

o ,;it,,,

0

0

o o ~

o

I I I -

o

II -

o _itch

0 0

o

0 0 0 0 O0 0 0 i l l Ul 0 C d Figure 17. Various combmanons of colonnades, lesenae and cells

364

nSteps # # (S{ 1,2}. (1 + d/Length, 1 + d/Width), T { 3 } ' ( - d / 6 ) , Basement) ) Where Def Length = sizE{ 1}. Basement, Def Width = SIZE{2}:Basement, Def Basement = CENTRE{ 1,2}. ((Box{ 1,2}. Object ) • "(d/6) ) End where Box and SIZEare PLASMpredefined functions which gwe the polyhedron coinciding wRh the (partial) extent of the polyhedral parameter, and the real size (along a coordinate direction) of this extent, respectively It is finally possible to complete the example (see Figure 18) and gwe the higher-level script, which describes the whole temple by using the prewously written definitions Def Temple (nSteps::IsNat, d asRealPos) = Top. (Steps (nSteps, d, ColonnadeWithCeU d), ColonnadeWlthCelt: d)

APPENDIX B Modern-movement btdiding example

o

0

o 0

The temple steps will depend on the number of columns and on their diameter, but it is sufficient to pass to this function the object ColonnadeWlthCell previously defined. This makes the definitmn not parametric, as that parameter contains a fixed number of columns

Discussed in this example is the PLASMmodel of Oud's Mathenesse (a temporary building for work management) (design by J J P Oud, Rotterdam, Netherlands (1923)) (see Figure 19) In particular, a top-down approach is applied that ~s based on design refinement. In fact, one can start from the assumption that the building shape is generated by a set of pure simple volumes. The design development starts in 2D by gwlng some defimtions for the plan sectmn of the three mum volumes of the office and service rooms and the corridor Def Room (x:.tsSeq) = IF. (isPalr,Cubold{ 1,2}, ERROR) X,

Def Office = Room, Def Service -- Room, Def Corridor = Room First, TwoRooms Is defined as an L-shaped combination of spaces, and CloakRoom is defined. Then, they and their symmetric instances are posiUoned within Service The function ADD lS defined as STgUCT o ALIGN, a n d It

computer-a,ded des,gn

Programming language for sohd variational geometry Def Sym{i} (Object:isPol) = STRUCT:(S{i} : - 1,ObJect) Def SymRooms (sl,s2 :lsRealPos) =

ADD{< ],MIN,MIN>, <2,MIN,MIN) } :< CloakRoom: ( (3/5)s 1, s2 - s 1), Sym{2} o T w o R o o m s : ( s l , s2) ) Remember that the ADD functmn ~s equivalent to the traversal of a structure, and that th~s implies an ~mplic~t (cumulative) difference between the substructures. The mare room in the symmetric Instance of TwoRooms results m being squared by this difference. TwoRooms and SymRooms are now posmoned withm Service, giving the detailed service area" Def DetServme (sx,sy':lsRealPos) = ADD{(1,MIN,MIN), (2,MIN,MIN)} o [TwoRooms, ADO {( I,MIN ,MIN ) ),( 2 ,MAX ,MAX > }o [SymRooms,Office]] . (sx,sy)

II

The three volumes of the building are defined as follows (see Figure 20)" Def Office3D (sidel,slde2,h:'lsRealPos) = (Office:(sldel,side2)) • " ( h ) , Def DetServlce3D (side 1,side2,h :: lsRealPos) = (DetService: (sidel,slde2)) • " ( h ) , Def Corridor3D (side 1,side2,h': lsRealPos) = (Corrldor:(sldel,sIde2)) • "(h) The preliminary design is finally defined by properly ahgnmg the three volumes.

b Figure l& Temple; (a) 3-point mew of whole temple, (b) 2-point view uses the same specificatmn parameters as ALIGN: Def CloakRoom (sx,sy.:lsRealPos) =

ADD {< I,MAX ,MIN > >,< 2,MIN,MIN > }" ( Locker" ( (2/5)sx ,sy ), TwoWardrobes: ( (3/5)sx, sy ))

Def Mathenesse (slo,s2o,ho, sls,s2s,hs, s 1c,s2c,hc::isRealPos) =

ADD{, (2,MED,MEO)}. < Office3D" (slo, s2o, ho), ADD{< 1,MED,MED>, <2 ,MED,MED> } : < DetServic~3D. (sls, s2s, hs), C o r n d o r 3 D : ( s l c , s2c, hc) ) )

Where Def TwoWardrobes (a,b::lsRealPos) = " • "
b/2),

Def Locker (a,b :lsRealPos) = Room: (a, b) End Def Two Rooms (sx ,sy:: lsRealPos) = ADD{( 1,MAX,MIN), ( 2 ,MIN,MIN) }. ( Room: ( (3/5)sx, sy),

Room.((2/5)sx, sy/3) )

I

!

I II

I I

a b Figure 19. Temporary buddmg for work management, (a) schemanc plan, (b) roof plan

volume 24 number 7 july 1992

Figure20. Mathenesse,

(a) axonometrtc mew, (b)

axonometrtc section 365

A Paoluzzl and C Sansonl Notice that the previous definition is not correct, as the more external ADD function would make the objects Office3D and DetServlce3D topologically nonconnected, or, better, connected only by C o r n d o r 3 D Conversely, in O u d ' s design, they have one side m common. A very sample solution is to substitute the alignment directive (1,MED,MED) wlth (1,MIN,MIN) This lS not completely correct from the volumetric point of view, as, in original Mathenesse, there is a compenetratlon of the office volume into the corridor volume Therefore, it would be necessary to locate d~rectly, gwing exphot transformations, the C o r n d o r 3 D volume in its proper place This will actually be very easy to do when the PLASM development environment contains a graphical interface The previous model is a set of 3D sohd volumes The model consUtuted by a set of 3D polygons can be obtained by applying the alias Def PolygonModel (ObJect. asPol{3,3}) = @2"Object of the function @2 to MATHENESSE PolygonModel o MATH~,NESSE.( s l o , s 2 o , h o , sls,s2s,hs, s l c,s2c,hc )

A solid model (with an external envelope of thickness ExtThlck, a basement of thickness BaseThick, and internal partlt~ons of thickness InThick, but without openings and doors) is easily obtained as follows

previous section PROJECTObject, where, in this case, O b j e c t ~ 3'3, is a predefined PLASM function which projects the argument on a coordinate subspace (in this case the x y plane) Notice that SohdModel is really a program, ~e a functional abstraction which can be apphed to any argument (of the right type) It can be used to compute the solid model of the parametric Mathenesse as follows" SohdModel. (MATHENESSE.( s l o ,s2o ,ho , s l s,s2s,hs, s l c,s2c,hc ) ,20,8,40 )

In order to obtain external and internal openings m the model, one could proceed in many ways, both by writing specml-purpose scripts and by mteractwely applying proper operations

Dr Alberto Paoluzzt recewed a laurea degree cum laude m cwd engineering from the Unwerszty of Rome, Italy, m 1975 From 1976 to 1983, he was wtth the Department of Architecture and Town Planning Currently, he zs an assoctate professor of computer graphws at the Department of lnformatws and Systems Sctence, Umverstty of Rome "La Sap~enza', Italy, where he leads the CAD group, m whwh varwus prototype sohd modellers are being tmplemented Hts current research mterests focus on dtmenswn-mdependent sohd modelhng, motzon plannmo and destgn languages For the last three years, he has been on the board of the Itahan Computer Graphtcs Assoctatton

Def Envelope (Object:.lsPol{3,3})= @'Object Def PartiUons (Object.. lsPol{3,3 }) = ([@2,@].Object) Def SohdModel (Object'.lsPol{3,3}; ExtThick,InThick,BaseThlck: :isRealPos) = Top o [Bufldmg,Basement]'Object Where Budding = + o [ + + o [Envelope,K ExtThlck], + + o [Partmons,K" InThick]], Basement = • o [Project{1,2},"o K ' ( B a s e T h l c k ) ] End where + denotes set union, • denotes the product of polyhedra, and + + ~s the offset operator defined m a

366

Dr Claudto Sansom recewed a laurea degree m . . . . archttecture from the Umverstty of Rome, Italy, m 1974 From 1983, he was a research fellow m the Department of Architectural and Urban Design, where he collaborated on courses on theory and methodology m deston, computeraided deston, and computer-a~ded archuectural deston In recent years, he has also collaborated wzth ABACUSat the Umverszty of Strathclyde, UK '7~e' ts currently a guest professor of computer graphws for architectural deszgn at the Department of Architectural and Urban Demgn, School of Archztecture, Unwerstty of Rome "La SapJenza ', Italy Hts prtmary research mterests are the apphcatwns of computer graphtcs and CAt~ techmques to archttectural destgn, geometrw modellmo m architectural destgn, and vtsual stmulatwn for impact analysts Another field of interest ts the use of quantltatwe methods for landscape studtes

computer-aided design