Geometric Programming for Computer Aided Design

Geometric Programming for Computer Aided Design

by Alberto Paoluzzi
Geometric Programming for Computer Aided Design

Geometric Programming for Computer Aided Design

by Alberto Paoluzzi

eBook

$136.00 

Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
WANT A NOOK?  Explore Now

Related collections and offers

LEND ME® See Details

Overview

Geometric Programming is currently of interest in CAD (Computer Aided Design) and related areas such as computer graphics, modeling and animation, scientific simulation and robotics. A growing interest towards gemotric programming is forecast in the next few years with respect to market specific CAD applications (e.g. for architecture and mechanical CAD) and web-based collaborative design environments.

PLaSM is a general purpose functional language to compute with geometry which the authors use throughout their text. The PLaSM language output produces VRML (Virtual Reality Modelling Language) files which are used to create virtual worlds. PLaSM blends the powerful algebraic approach to programming developed at IBM research, with a dimension-independent approach to geometric data structures and algorithms, This book shows that such geometric code can be surprisingly compact and easy to write.

It begins by introducing the basic programming with PLaSM and algebraic and geometric foundations of shape modeling, the foundations of computer graphics, solid modeling and geometric modeling of manifolds follows and finally discusses the application of geometric programming. For each topic, the mathematics is given, together with the PLaSM implementation (usually with a few lines of readable code) and some worked examples.

  • Combines excellent coverage of the theory with well-developed examples
  • Numerous applications eg. scientific stimulation, robotics, CAD, Virtual Reality
  • Worked exercises for each topic
  • Uses PLaSM language (supplied) throughout to illustrate techniques
  • Supported with web presence

Written for Industrial Practioners developing CAD software, mechanical engineers in Graphics, CAD and CAM, undergraduate and postgraduate courses in Computer Science and Mechanical Engineering,as well as programmers involved with developing visualization software.


Product Details

ISBN-13: 9781119509127
Publisher: Wiley
Publication date: 01/30/2018
Sold by: JOHN WILEY & SONS
Format: eBook
Pages: 815
File size: 192 MB
Note: This product may take a few minutes to download.

About the Author

ALBERTO PAOLUZZI, Department of Computer Science, Universita Roma Tre, Italy.

Read an Excerpt


Geometric Programming for Computer-Aided Design



By Alberto Paoluzzi


John Wiley & Sons



Copyright © 2003

Alberto Paoluzzi
All right reserved.



ISBN: 0-471-89942-9





Chapter One


Introduction to FL and PLaSM


A statement is a programming language construct that is evaluated
only for its effect. Examples include assignment, input/output
statements, and control statements. Programs in most languages
are composed primarily of statements; such languages are said to
be statement oriented.

Programming language constructs that are evaluated to obtain
values are called expressions. Arithmetic expressions are the most
common example. Expressions may occur as parts of statements, as
in the right-hand side of an assignment statement. Expressions that
are evaluated solely for their value, and not for any other effects of
the computation, are said to be functional.

Some programming languages, such as Scheme, are expression
oriented
; their programs are constructed of definitions and
expressions; there are no statements.
(D. P. Friedman, M. Wand, and C. T. Haynes
Essentials of Programming Languages
The MIT Press and McGraw-Hill, 1992)


The designlanguage PLaSM, which this book aims to describe, is a geometry-oriented
extension of a subset of FL, an advanced language for programming at Function
Level
, developed by the Functional Programming Group of IBM Research Division
at Almaden [BWW90, BWW+89]. The design language PLaSM, whose name stands
for "Programming LAnguage for Symbolic Modeling", was developed [PPV95] by
the CAD Group at the University "La Sapienza" and then supported and further
developed at "Roma Tre" University in Rome. Such language is strongly influenced
by FL; actually, it can be considered a geometry-oriented extension of a FL subset,
with only a few small syntactical differences. In the present chapter a short outline of
the FL approach to functional programming is given, together with an introduction to
PLaSM and to its geometric operators. The chapter is aimed at discussing the language
syntax and at getting started with a working system. In the last part of the chapter we
introduce the first examples of geometric programming. The main goal of the chapter
is to give the flavor of language style and expressive power. Therefore, many concepts
are introduced informally here and defined carefully in later chapters.


1.1 Introduction to symbolic design programming

The FL language, on the line traced by the Backus' Turing lecture [Bac78], introduces
an algebra over programs, where a set of algebraic identities between functional
expressions is established. Such an algebraic approach to programming allows,
among several other interesting features, formal reasoning about computer programs.
Furthermore, programs are easily combined, so that new programs are obtained from
simpler ones in a easy and elegant way. Also, it is possible to find simpler equivalent
programs, both at the design and at compiling stages. Great advantages are thus
obtained in the style and efficiency of program prototyping.

More generally, it is well known that functional programming enjoys several good
properties:

1. The set of syntax rules of a functional language is very small.

2. Each rule is very simple.

3. The program code is terse and clear.

4. The meaning of a program is well understood, since there is no state.

5. Functions may be used both as programs and as data.

6. Programs are easily connected by concatenation and nesting.

The PLaSM language was designed upon the main assumption that a functional
computing environment is the natural environment for geometric computations and
generation of geometric models of shape. In fact, a complex geometric shape is often
constituted by an assembly of components, which are highly dependent on each other.
In particular:

1. Components may result from computations invoking other components.

2. Parameterized generating functions may be associated with each component.

3. Geometric expressions are the best candidates to produce actual parameter
values when generating assembly components.

Our design language, strongly inspired from FL, can therefore evaluate geometric
expressions
, that are expressions whose value is a polyhedral complex, i.e. a set of
polyhedral point sets. It is also able to combine functions to produce higher-level
functions in the FL style. Beyond the adopted approach to programming at Function
Level
, which allows computing with functions as well as with numbers, we note the
unique design choice of dealing only with a dimension-independent implementation of
geometric data structures and algorithms. The first feature results in a very natural
approach to parametric geometry. The second feature, coupled with the "combinatorial
engine" of FL, gives the language an amazing descriptive power in computing with
geometry.

1.1.1 Computational model

In this section a first introduction to our approach to symbolic design programming
is given. A more detailed discussion of language syntax and semantics is left to the
following sections and chapters.

Programs are functions Generally speaking, a program is a function. When
applied to some input argument, a program produces some output value. Two programs
are usually connected by using functional composition, so that the output of the first
program is used as input to the second program.

Program composition and application The composition of PLaSM programs
behaves exactly as the standard composition of mathematical functions. For example,
the application of the compound mathematical function f [omicron] g to the x argument

(f [omicron] g)( x) [equivalent to] f(g(x))

means that the function g is first applied to x and that the function f is then applied
to the value g(x). The PLaSM notation for the previous expressions will be

(f ~ g) : x [equivalent to] f : (g : x)

where ~ stands for function composition and where g:x stands for application of the
function g to the argument x.

Naming objects In PLaSM, a name can be assigned to every value generated by
the language, by using a DEF construct, either with or without explicit parameters.
In both cases the so-called body of the definition, i.e. the expression which follows the
definition head, at the right hand of the "[equivalent to]" symbol, will describe the computational
process which generates the value produced by the computation. The parameters which
it implicitly/explicitly depends on may be embedded in such a definition.

For example we may have

DEF object = (Fun3 ~ Fun2 ~ Fun1):parameters;

The computational process which produces the object value can be thought as the
computational pipeline shown in Figure 1.1.

In the previous example the dependence of the model upon the parameters is
implicit. In order to modify the generated object value it is necessary (a) to change
the source code in either the body or the local environment of its generating function;
(b) to compile the new definition; and (c) to evaluate again the object identifier.

Parametrized objects A parametric geometric model can be defined, and easily
combined with other such models, by using a generating function with formal
parameters. Such kind of function may be instanciated with different actual arguments,
thus obtaining different output values. For example, we may have

DEF object (params::IsSeq) = (Fun3 ~ Fun2 ~ Fun1):params;

DEF obj1 = object:< [p.sub.1], [p.sub.2], ..., [p.sub.n] >;
DEF obj2 = object:< [q.sub.1], [q.sub.2], ..., [q.sub.n] >;

It is interesting to note that the generating function of a geometric model may accept
parameters of any type, including other geometric objects.

1.2 Getting started with PLaSM

When taking the first steps with a new computer language, it is useful to carefully
introduce the operations to start. In particular, in this section we discuss step-by-step
how to download the PLaSM design environment from the web, its installation on the
desktop machine, and the first computational experiences with it.

1.2.1 Installing the language

The integrated PLaSM "design environment" consists at least of a language interpreter,
and may contain a source editor, a local or remote language server, and the preferred
web browser enriched with one or more graphics plug-ins. PLaSM is available for all
the Windows versions, all the brands of GNU/Linux, and the Apple's Mac OS X
operating system.


Software download

The current PLaSM interpreter is written in Scheme and C++, by using a first-class
multi-platformScheme implementation called PLT Scheme. The first task for the user
is to download the PLaSM interpreter and, possibly, other useful softwares from the web
sites they reside on.

1. Interpreter

The PLaSM interpreter is located at the web address
plasm.net/download/

The typical user may like to get the binary executables for the preferred
computational environment. Conversely, the advanced user might prefer to
get the sources and to recompile and build the interpreter.

2. Editor

An integrated language editor is not strictly required, since a standard text
editor would be sufficient, but it may be very useful. The specialized PLaSM
editor Xplode, which stands for "Is a PLasm Open Design Environment", will
provide for syntax coloring, tab completion, menus of available libraries and
functions, quick documentation and direct evaluation of every sub-expression.
A standard version is already integrated in the interpreter package.

3. Browser plug-ins

The PLaSM environment does not currently offer an integrated viewer for
graphics data. Conversely, it allows the user to export the geometric objects
generated by the language into some largely diffused web standard formats,
including VRML (Virtual Reality Modeling Language) for 3D graphics, as well
as SVG (Scalable Vector Graphics) and Flash for 2D graphics. The reader may
find large collections of VRML resources on the web. The browser plug-ins
for .svg (SVG) and .swf (Flash) files can be downloaded from the Adobe,
and the Macromedia web sites, respectively.


Software installation

A minimal PLaSM system is constituted by a language client connected to a remote
server and by a web browser with a VRML viewer installed. A full PLaSM environment
contains a local language server, an integrated editor and more plug-ins for supported
graphics formats.

The following instructions are for all Windows environments. For other platforms
follow the installation guidelines given on the language site.

1. Language server

The installation on the local machine is very simple: double-click on the file
plasm.exe and answer the installer requests.

2. Language client and editor

The language client and integrated editor Xplode are already installed automatically
in the previous step. Launch Start -> Programs -> Plasm ->
Xplode to start working. If some problems arise, the editor will ask to browse
within the disk and to show where the server is located.

3. Plug-ins

Follow the installation instructions given at the web sites of the graphics
plug-ins used, normally to be installed within a web browser.

1.2.2 Using the language

A typical PLaSM session consists in reading/writing/editing definitions, evaluating
definitions and/or expressions, exporting geometric values to external files,
saving/restoring geometries to/from xml files, and in visualizing the contents of
graphic files.


Getting started

In order to check if the language environment has been installed correctly, try
generating a red cube and displaying it within your web browser. To do this:

1. Launch the Xplode editor from either the Start -> Programs ->
Plasm -> Xplode menu (on Windows) or from the Applications folder (on
MacOS X).

2. Write on the superior editor window the following code:

DEF mycube = CUBOID:<1,1,1> COLOR RED;
mycube;

then either launch the menu item PLaSM -> Evaluate Buffer or hit B
(on Windows) or B (on MacOS X).

3. The listener should write, on the inferior window, the message:

==================
mycube DEFINED
==================

PolComplex < 3 , 3 >
$ < < 'RGBcolor' , < 1 , 0 , 0 > > >

that acknowledges the correct definition of the mycube symbol and tell the
user about the type of the expression evaluated on the last input line.

4. Select the mycube symbol using the mouse.

5. Either launch the menu item PLaSM -> Vrml Export or hit M (on
Windows) or M (on MacOS X). Answer OK to the dialog window
asking for confirmation on the symbol/expression to evaluate and export.

6. Insert, in the exporting dialog window the filename mycube.wrl and select
the directory where to export the generated file. You should own the writing
permissions on such directory.

7. Load the mycube.wrl file within your browser, where you must have
previously installed and configured a VRML plug-in.

8. Enjoy rotating and scaling your first geometric model!

The remainder of this section is quite technical, and can be avoided at a first reading
by a non-computer science-oriented reader. That kind of reader can go directly to
Section 1.3. He or she will go back when willing to understand what is going on within
the language design environment and exporter.


Interacting with the language

First of all, the reader must understand that every PLaSM source program is a string,
i.e. a sequence of characters enclosed between (double) quotes, that must be processed
by the language interpreter.

The PLaSM interpreter was previously written in Common Lisp, and is currently
implemented in MzScheme ("Miss Scheme"), a first-class implementation [FFFK98]
of Scheme, which is a simple, powerful and beatiful Lisp dialect [SF97, FH92].

Evaluating expressions The processing of every PLaSM program requires the
evaluation of a Scheme expression. For example, the evaluation of the PLaSM expression

(SQRT:3 + 10) /(3.5

Continues...




Excerpted from Geometric Programming for Computer-Aided Design
by Alberto Paoluzzi
Copyright © 2003 by Alberto Paoluzzi.
Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Table of Contents

Preface.

I Programming and Geometry.

Introduction to FL and PlaSM.

Geometric programming.

Elements of linear algebra.

Elements of polyhedral geometry.

Elements of differential geometry.

II Graphics.

Affine transformations.

Graphic primitives.

Hierarchical structures.

Graphic pipelines.

Viewing and rendering.

III Modeling.

Parametric curves.

Parametric surfaces and solids.

Basic solid modeling.

Dimension-independent PLaSM operators.

Motion modeling.

Appendix A: Definition of MyFont.

Appendix B: PLaSM libraries.

Appendix C: References.

Index.

What People are Saying About This

From the Publisher

"...an ambitious text that covers a lot of ground...very suitable for postgraduate research and teaching..." (Computer-Aided Design, 2004)

From the B&N Reads Blog

Customer Reviews