GEOMETRIC MODELS S JOSEPHINE THERESA DEPT OF CS

  • Slides: 28
Download presentation
GEOMETRIC MODELS S. JOSEPHINE THERESA, DEPT OF CS, SJC, TRICHY-2

GEOMETRIC MODELS S. JOSEPHINE THERESA, DEPT OF CS, SJC, TRICHY-2

CONTENT • A SIMPLE MODELING • GEOMETRIC MODELING • SYMBOLS AND INSTANCES

CONTENT • A SIMPLE MODELING • GEOMETRIC MODELING • SYMBOLS AND INSTANCES

INTRODUCTION • Most popular and effective use of digtial computer is physical system •

INTRODUCTION • Most popular and effective use of digtial computer is physical system • General term “Modeling” • Computer models can be built of both physical objects and physical processes

Examples • • • Electric Circuit Building National and world Economies Weather All these

Examples • • • Electric Circuit Building National and world Economies Weather All these examples use computer models to help them in their design work

 • Computer model is used as a basis for simulation • It is

• Computer model is used as a basis for simulation • It is very important field of computing • Number of programming languages have been designed to help simulation by making it easier to build models • It is mainly used in Computer aided design • Solid objects are modeled by computer

Continuation…. • Integrated circuits are modeled it can be checked automatically against design rule

Continuation…. • Integrated circuits are modeled it can be checked automatically against design rule • CG is associated with modeling • It is very convenient way to observe the behaviour of computer models • Simulate weather patterns, we can plot pressure and temperature values on a displayed map instead of printing them in a tabular form

A simple data structure representing a circuit model type x x 1 y type

A simple data structure representing a circuit model type x x 1 y type X y components Wire segments x 2 y 2

 • Each component is defined by an element • Data containing its type

• Each component is defined by an element • Data containing its type and coordinate position on the diagram and each line segment of a wire is defined by coordinates of its two endpoints • Relational information- Connection between components- is defined by procedures • We can write a procedure whether a wire and a component are connected by comparing coordinates

 • We can write another procedure to apply a similar connectivity test to

• We can write another procedure to apply a similar connectivity test to any two wires • Then applying these two procedures iteratively to the contents of the data structure we can determine which components are connected together.

A SIMPLE MODELING • Many computer models consist of a mixture of data structure

A SIMPLE MODELING • Many computer models consist of a mixture of data structure and procedures • In few cases models of a solid objects we find a lot of data and very few procedures • Circuit model is no exception to the rule • It consist of a simple data structure supplemented by some procedures • The data structure defines each of the components and connecting wires in the circuit diagram • It does not contain any relational information

Inclusion of component definition in the model X 1 • • 1 • 2

Inclusion of component definition in the model X 1 • • 1 • 2 • Y 1 X 2 y 2 3 X 1 Y 1 X 2 table Component lines Y 2

 • Line segments are generated using the stored endpoints as parameters • The

• Line segments are generated using the stored endpoints as parameters • The display of the components is slightly more complicated • This algorithm will scan the list of lines and components and display each at its apporpriate position

ALGORITHM Procedure show wires var I : integer Begin For i=1 to n wires

ALGORITHM Procedure show wires var I : integer Begin For i=1 to n wires do begin Move. To(Wires[i]. x 1, wires[1], y 1); Line. To(Wires[i]. x 2, wires[i], y 2) End end; Procedure showcomponents Var I, j; integer; xt, yt; real; c: coponent Begin For i=1 to n components do begin Xt=components[i]. x Yt=components[i]. y C=componenttable[component[i], comptyp]; With c do begin For j=1 to n lines do begin Move. To(Lines[j]. x 1+xt, Linesj]. y 1 yt); Line. To(Lines[j]. x 2+xt, Linesj]. y 2 yt) End end end

GEOMETRIC MODELING • It is in the form of circuit diagram • The line

GEOMETRIC MODELING • It is in the form of circuit diagram • The line segments representing each component and each connection in the circuit are fully defined by the coordinates stored in the data structure • Models which have this property are called geometric models • We can also construct physical model • Non geometric modeling is usually applied to physical processes rather than objects

Procedure to determine the coordinates of a sequence of lines connecting two components Procedure

Procedure to determine the coordinates of a sequence of lines connecting two components Procedure Link. Points(x 1, y 1, x 2, y 2: integer); Begin Move. TO((x 1, y 1); Line. TO((x 1+x 2)/2, y 1); Line. To((x 1+x 2)/2, y 2); Line. To(x 2, y 2) end

A pair of components connected by lines generated with the Link. Points Procedure b

A pair of components connected by lines generated with the Link. Points Procedure b a

Displaying a Geometric Model • A model that defines the geometric form of an

Displaying a Geometric Model • A model that defines the geometric form of an object • There are 3 different displayed representations of the same three dimensional object • Display model objects depends on hardware and software for their display • Methods are based on common features such as

 • Basic elements of data that typically appear as individual graphic entities on

• Basic elements of data that typically appear as individual graphic entities on the screen • Structure - Certain relationships between the basic data elements - Many different kinds of relationship can be expressed in models - Like lists, arrays, sets, rings and other kinds of structuring mechanisms

 • Transformation - Define the position and orientation of each part of the

• Transformation - Define the position and orientation of each part of the modeled object - When there is no repetitive use of the same component we use transformation to position the different parts of the modeled object

SYMBOLS AND INSTANCES • The use of graphical symbols is very common in charts

SYMBOLS AND INSTANCES • The use of graphical symbols is very common in charts and graphs • When we draw charts on a display we must be able to define symbols and multiple instances of each symbol in the chart itself • Define the symbol in a different coordinate system called master coordinate system • Functions are needed for the specification of instance transformations

 • There are three new instance transformation functions allow us to define the

• There are three new instance transformation functions allow us to define the scaling, rotation, and translation to be applied to the symbol • Scale(sx, sy) – scale the symbol by factors sx and sy in the x and y directions relative to the origin • Rotate(teta) – Rotate the symbol through teta degrees clockwise about the origin • Translate(tx, ty)- Translate the symbol through distance tx and ty measured in x y directions

Ori gin Master Coordinate Definition Rotate (45) Scale(0. 3, 0. 3) Translate(12, 10)

Ori gin Master Coordinate Definition Rotate (45) Scale(0. 3, 0. 3) Translate(12, 10)

Steps in the transformation sequence World coordinate System world Apply viewing transformation clip Generate

Steps in the transformation sequence World coordinate System world Apply viewing transformation clip Generate display code

master Apply instance transformatio m Master Coordinate data world Apply viewing transformatio n screen

master Apply instance transformatio m Master Coordinate data world Apply viewing transformatio n screen clip Generate display code

PICTURE STRUCTURE • Geometric models and other forms of data has clear structure •

PICTURE STRUCTURE • Geometric models and other forms of data has clear structure • Structure use certain symbols, in connections drawn linking the symbols • And overall organization of the displayed image

Techniques in picture • Repetition - Inherent in many pictures - Repeated instances of

Techniques in picture • Repetition - Inherent in many pictures - Repeated instances of symbols • Connectivity - Pictures show the relationship between elements by means of lines and arrows connecting them

 • Construction - Use Transformation and symbols in constructing pictures • Interaction -

• Construction - Use Transformation and symbols in constructing pictures • Interaction - Dispplay file segments simplify the design of interactive programs and permit us to divide pictures. It is visible structure

DEFINING SYMBOLS BY PROCEDURES • Repetitive structure in pictures use symbols to represent these

DEFINING SYMBOLS BY PROCEDURES • Repetitive structure in pictures use symbols to represent these structures • Method of defining symbols and invoking instances of them that made use of sequences of primitive function calls