MEG 361 CAD Chapter 3 Basic Concepts of Graphics Programming.

Slides:



Advertisements
Similar presentations
Computer Graphics- SCC 342 Chapter 3: Computer Graphics Software Dr. Doaa Hegazy.
Advertisements

COMPUTER GRAPHICS SOFTWARE.
Chapter 3: Modules, Hierarchy Charts, and Documentation
Graphics Pipeline.
1 Computer Graphics Chapter 8 3D Transformations.
1 Computer Graphics Chapter 2 Input Devices. RM[2]-2 Input Devices Logical Input Devices  Categorized based on functional characteristics.  Each device.
In the name of God Computer Graphics Bastanfard.
Computer-Aided Design Chapter 7. Computer-Aided Design (CAD) Use of computer systems to assist in the creation, modification, analysis, and optimization.
Coordinate Systems John Kirby.
MR.E.S.AGRAWAL SGGSIE&T, NANDED CAD Software and Hardware.
Output Primitives Computer Graphics.
PARAMETRIC EQUATIONS AND POLAR COORDINATES 9. Usually, we use Cartesian coordinates, which are directed distances from two perpendicular axes. Here, we.
IE433 CAD/CAM Computer Aided Design and Computer Aided Manufacturing Part-4 Computer Graphics- CAD Software Dr. Abdulrahman M. Al-Ahmari Industrial Engineering.
CMPE 466 COMPUTER GRAPHICS
Computer-Based Animation. ● To animate something – to bring it to life ● Animation covers all changes that have visual effects – Positon (motion dynamic)
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
Circle Drawing algo..
MEG 361 CAD Dr. Mostafa S. Hbib. Components of CAD/CAM/CAE Hardware and software enable interactive shape manipulation.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
Basic graphics. ReviewReview Viewing Process, Window and viewport, World, normalized and device coordinates Input and output primitives and their attributes.
Dr. S.M. Malaek Assistant: M. Younesi
Interactive Input Methods & Graphical User Input
CGMB214: Introduction to Computer Graphics
Two Dimensional Viewing
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
Shadows via Projection Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, November 5, 2003.
Institute for Visualization and Perception Research 1 © Copyright 2000 Haim Levkowitz Introduction (Foley & Van Dam Ch 1) Uses of computer graphics … Some.
INT 840E Computer graphics Introduction & Graphic’s Architecture.
Computer Graphics Lecture 32 Fasih ur Rehman. 3D Transforms The idea of 3D transforms is the same as that of 2D – A 3D point is represented by (x, y,
V part 1 Obtained from a Guildford County workshop-Summer, 2014.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Graphics and Images Graphics and images are both non-textual information, that can be displayed and printed. These images may appear on screen as well.
Introduction to Computer Graphics Chapter 6 – 2D Viewing Pt 1 1.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
In the name of God Computer Graphics.
Basic Theory (for curve 02). 1.3 Parametric Curves  The main aim of computer graphics is to display an arbitrary surface so that it looks real.  The.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
Computer Graphics, KKU. Lecture 41 The Computer Programming Laws Any given program, when running, is obsolete. Any given program costs more and.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
Chapter 1 Graphics Systems and Models Models and Architectures.
OUTPUT PRIMITIVES A.Aruna/Faculty of Information technology/SNSCE13/19/2016.
QSREALM.BLOGSPOT.COM Input Output Devices. QSREALM.BLOGSPOT.COM Input – Output Devices Also known as Peripheral Devices. These surround a computer’s CPU.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Graphics Programming. Graphics Functions We can think of the graphics system as a black box whose inputs are function calls from an application program;
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Chun-Yuan Lin Coordinate Reference Frames 2016/6/22 1 CG.
1 INTRODUCTION TO COMPUTER GRAPHICS. Computer Graphics The computer is an information processing machine. It is a tool for storing, manipulating and correlating.
Viewing in 3D Lecture 11. Viewing in 3D2 u The 3D viewing process is inherently more complex than is the 2D viewing process. F In 2D, we simply specify.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Rendering Pipeline Fall, 2015.
Computer-Aided Design
In the name of God Computer Graphics.
Computer Graphics.
Coordinate Reference Frames
Chapter Three Part I Output Primitives CS 380.
Example: Card Game Create a class called “Card”
Prodi Teknik Informatika , Fakultas Imu Komputer
Computer Application AutoCAD Program
Interactive Input Methods & Graphical User Input
Interactive Input Methods & Graphical User Input
TOPIC: Computer-Aided Design
Presentation transcript:

MEG 361 CAD Chapter 3 Basic Concepts of Graphics Programming

Interactive shape manipulation plays a major role in CAD/CAM/CAE Programming for graphics display on monitor is essential part of CAD/CAM/CAE software

Graphics Libraries Graphics Software may be divided into two groups : device driver and graphics libraries.

Graphics Libraries Application Program Device Driver Input/output Devices Graphics programming using graphics driver Directly, i. e.,"no libraries" … More …

Graphics Libraries … Device Driver is a set of machine-dependant codes that directly controls the display processing unit of a graphics device so that the electron beam is cast at the desired location. Each device driver (machine- dependant) has only a primitive capability, and so a graphics program written with such commands would be very long if any meaningful task to be performed. A program with poor readability will result.

Graphics Libraries … More … Application Program Device Driver Input/output Devices Graphics programming using graphics libraries Graphics Library

Graphics Libraries … Graphics Libraries: Similar to the math libraries in conventional programming, the graphics library is a set of subroutines, each of which has a specific purpose. For example, a subroutine might draw a line or subroutine might draw a circle. The graphics library is built on top of the device driver as shown below. Each subroutine is created by using a supporting set of device driver commands, for example a subroutine for drawing a drawing a short straight-line segment, circle might be composed of series of device driver commands … More …

Graphics Libraries … Examples of Existing Graphics Libraries: Core graphics provided in 1977, SIGGraph of the Association of Computing Machinery (ACM) It does not provide enough commands to use all raster graphics systems. GKS was developed by (ISO) in about … More …

Graphics Libraries … Examples of Existing Graphics Libraries….: Both CORE and GKS have some deficiencies with regard to supporting dynamic display and versatile user interaction. OpenGL, set of libraries developed by Silicon Graphics Company, runs under MSwindows NT. It becomes the standard graphics library.

Coordinate Systems… Basic tasks to display an image of an object on a graphics device: Specifying the location of all points on the object in space. Determining which locations on the display monitor to be occupied by those points. … More …

Coordinate Systems… Thus a coordinate system is necessary to provide a reference for specifying the location of a point both in space and on the monitor … More …

Coordinate Systems… 1 Device coordinate system: Is used as the reference in defining a location on the display monitor. The origin of u-v-z axes is chosen arbitrary. … More … u u u v v v screen z

Coordinate Systems… 2 Virtual device coordinate system: Has the same origin. The origin of u-v-z axes is in the lower left part. Graphics programmer specifies a shape consistently regardless of the DCS. … More … u v screen

Coordinate Systems… Device coordinate system and Virtual device coordinate system are 2-Dimesional … More …

World Coordinate System (WCS) Is used to describe how the world of interest looks like. It is 3-Dimesional. … More … It describes the locations and orientations of desks, chairs, and the blackboard if our world is a classroom.

Model Coordinate System (MCS) Is used to describe the shape of a part w.r.t. MCS attached to it. It is 3-Dimesional. … More … In MCS the coordinates of points on the part do not change their values even when the part is translated and/or rotated.

Model Coordinate System (MCS)….. The location and orientation of each part are then specified by WCS. The coordinates of all points of the parts are obtained in WCS using transformation matrices. … More …

Two Types of Projection … More … Perspective Projection Parallel Projection

Transformation bet. Coordinate Systems

Window and Viewport Window defines the region in space that will be projected onto the display monitor so that any object outside the space of the monitor will not be displayed Parallel Projection Viewport(s) is the area(s) on the display monitor where we want the projected image to appear. … More …

Window and Viewport OpenGL Sample Parallel Projection

Output primitives are the graphics elements that can be displayed by a graphics libraray. Line, Polygon, marker and Text are examples of output primitives.

Graphics Input … Graphics program accepts points, lines, or polygons as input in addition to numbers and text strings (e.,g; select a polygon among all the graphics elements on the display Locator and Button are two types of physical device.

Graphics Input Locator and Button Locator transfers location of cursor to the graphics program (mouse ball) Button transfers action of user on or off at current cursor location (mouse button)

Representation of Cureves In solid modeling and computer aided drafting systems, curve equation itself or its attributes (center point, radius,..) have to be stored.

…Representation of Cureves Curve equations: nonparametric Parametric,(x, y, z are related with a parameter ( θ )

Nonparametric Parametric …Representation of Cureves Circle

Conic Sections

See meg361_.....doc %parametric representation of curve %Line % %example: % fro the position vector P1=[1;2] %P2=[4;3];plot the line t=0:.01:1; x=1+3*t; y=2+t; plot(x,y);grid; xlabel('x'),ylabel('y'); axis([ ]);

%meg361 %parametric representation of %curve %parabola % %example: % Generate the parabolic segment % in the first quadrant for 1<x<4 %for the parabola given by % x=1*th^2, y=2*th, i;e; a=1 %plot the segment of the parabola a=1; xmin=1;xmax=4; thmin=sqrt(xmin/a); thmax=sqrt(xmax/a); th=thmin:(thmax-thmin)/101:thmax; x=a*th.^2; y=2*a*th; plot(x,y);grid; xlabel('x'),ylabel('y'); axis([ ]);

Linear Transformation Translation

Linear Transformation… Rotation… x-axis

…Linear Transformation… …Rotation… x-axis

…Linear Transformation… …Rotation… x-axis... Rot_x=

…Linear Transformation… …Rotation… Similarly; y-axis... Rot_y=

…Linear Transformation… …Rotation Similarly; z-axis... Rot_z=

…Linear Transformation… Graphics Library Example: how transformation matrix is called