Computer Graphics Prof. Muhammad Saeed. Drawing and Transformation of Figures in C# August 1, 20122.

Slides:



Advertisements
Similar presentations
Computer Graphics Prof. Muhammad Saeed Dept. of Computer Science & IT Federal Urdu University of Arts, Sciences and Technology.
Advertisements

An isometry is a transformation that does not change the shape or size of a figure. Reflections, translations, and rotations are all isometries. Isometries.
Computer Graphics Lecture 4 Geometry & Transformations.
Introduction to InDesign Understanding the Basics DTB203 Interior Visualisation
User Interface Programming in C#: Graphics
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Graphics and Multimedia. Outline Introduction Graphics Contexts and Graphics Objects Color Control.
® Microsoft Office 2010 PowerPoint Tutorial 2: Adding and Modifying Text and Graphic Objects.
Syracuse University 3D Framework using GDI+.Net Carmen Vaca Ruiz Independent Study Fall 2004 Instructor: Dr. Jim Fawcett.
April Geometric Transformations for Computer Graphics Shmuel Wimer Bar Ilan Univ., School of Engineering.
Graphics and Multimedia. Introduction The language contains many sophisticated drawing capabilities as part of namespace System.Drawing and the other.
Graphics Images – PictureBox control Drawing graphics - Graphics object Multimedia controls PictureBox control Image property – select image Choose how.
Graphics Standard Grade Computing. Graphics Package n A graphics package is another General Purpose Package. n It is used to draw pictures on the monitor.
CS324e - Elements of Graphics and Visualization Java2D Graphics.
ICS 61 - Graphics. Light Color Wheel Color Perception.
Lecture Set 13 Drawing Mouse and Keyboard Events Part A - Drawing.
Vector Graphics Making custom images. Raster vs. Vector Graphics In computer graphics, a raster graphics image, or bitmap, is a dot matrix data structure.
Whiteboardmaths.com © 2011 All rights reserved
Computer Graphics Prepared by Dragon Lee 1 January 2003.
1 CMT Fundamentals of Computer Graphics Revision Dr. Xiaohong Gao BG---Room 2C23 Week 11.
1 Windows Graphics. 2 Objectives You will be able to Use the Windows GDI+ to draw arbitrary figures and text on a Windows form. Add a handler for the.
Creating Special Effects
Object Oriented Programming Graphics and Multimedia Dr. Mike Spann
Graphics and Multimedia Part #2
COM148X1 Interactive Programming Lecture 6. Topics Today Generate Random Numbers Graphics Animation.
2D Graphics: Rendering Details
ETD 1330 CAD Introduction to AutoCAD Features Professor: Dr. Miguel Alonso Jr. Fall 2008.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
Working with Objects. Objectives Create an object Transform an object Arrange and lock an object Step and repeat an object Use Live Distribute Use the.
Tutorial 2 Drawing Shapes, Adding Text, and Creating Symbols.
Computer Graphics 3D Transformations. Translation.
Computer Graphics Camera Projection / Picking CO2409 Week 8 - Optional Advanced Material Not on Exam.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Objective: Students will be able to represent translations, dilations, reflections and rotations with matrices.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
CS COMPUTER GRAPHICS LABORATORY. LIST OF EXPERIMENTS 1.Implementation of Bresenhams Algorithm – Line, Circle, Ellipse. 2.Implementation of Line,
Handle By, S.JENILA AP/IT
CISC 110 Day 3 Introduction to Computer Graphics.
Lecture 5: Introduction to 3D
Computer Graphics I, Fall 2010 Transformations.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
Advanced Java Screen Update Techniques SD’98 - Session 4406 Ted Faison Faison Computing Inc.
Honors Geometry Transformations Section 3 Translations and Compositions.
Midterm Review Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Geometric Transformations Hearn & Baker Chapter 5
Computer Graphics 3D Transformations
Objectives Identify reflections, rotations, and translations.
Transformations Main Idea Notes Transformation
Introduction and Review Information
Graphics and Multimedia
Drawing Mouse and Keyboard Events Part A - Drawing
Introduction and Review Information
A movement of a figure in a plane.
Introduction to Computer Graphics
Transformations Lidia E. Garcia Alvizo.
4-4 Geometric Transformations with Matrices
Geometric Transformations for Computer Graphics
Extend Text Editor to Draw shapes
Introduction and Review Information
Algebraic Representations of Transformations
Performing Essential Operations
TRANSFORMATIONS Translations Reflections Rotations
Transformations my dear Watson.
Properties or Rules of Transformations
Transformations.
8th Grade: Chapter 6 TRANSFORMATIONS
Transformations Maria Garcia.
CPT 450 Computer Graphics 3rd Lecture.
Translation in Homogeneous Coordinates
Presentation transcript:

Computer Graphics Prof. Muhammad Saeed

Drawing and Transformation of Figures in C# August 1, 20122

1. Basic Mathematics 1.Matrices i.Addition ii.Multiplication iii.Transpose iv. Inverse v.Algebraic Laws vi.Symmetry and Orthogonality 2.Geometry i.Coordinate systems ii. Introduction to 2D and 3D geometry iii.Basic trigonometric Formulae Transformation of Figures Computer Graphics August 1, 20123

2. Mathematics of Transformations 1.Rotation i.Rotation matrices for 2D and 3D systems ii.Homogeneous coordinates iii.Rotation around any axis Quaternions iv.Compound rotation, inverse rotation v.Orthogonality 2.Translation i.Translation matrices for 2D and 3D systems ii. Compound translations and rotations, inverse translation 3.Scaling i.Scaling matrix and its inverse ii.Compound scaling with other transformations Transformation of Figures Computer Graphics August 1, 20124

4.Reflection i.Reflection matrices for 2D in axes and lines ii.Reflection in planes iii.Inverse reflection 5.Inversion i.Through the origin for 2D and 3D systems ii. Inverse inversion 6.Shearing Shearing a 3D figure 7.Representing 3D on 2D Representation Transformation Transformation of Figures Computer Graphics August 1, 20125

3.Programming in C# ……….. 1.C# Introduction & GDI+ 2. Drawing Primitives i.Graphics class, color, pen, brush private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Pen pen = new Pen(Color.Blue, sizeOfPen); //Pen pen = new Pen(Color.FromArgb(red, green, blue)); Brush brush = new SolidBrush(Color.FromArgb(red, green, blue)); Point point = new Point(); Brush brush1=Brushes.DarkSeaGreen; } public void userDefinedFunction() { Graphics g = CreateGraphics(); } Transformation of Figures Computer Graphics August 1, 20126

Transformation of Figures Computer Graphics ii.Line, circle, ellipse, rectangle, filled figures g.DrawLine(pen, x1,y1,x2,y2); g.DrawEllipse(pen, x1, y1, width, height); g.DrawRectangle(pen, x1, y1 width, height); g.FillEllipse(brush, x1, y1, width, height); iiiColor Common Dialog Box ColorDialog dlg = new ColorDialog(); dlg.FullOpen = true; Brush brush1; if (dlg.ShowDialog() == DialogResult.OK) { brush1 = new SolidBrush(dlg.Color); g.FillRectangle(brush1, x1, x2, width, height); } 3.Controls and Event Handling Menu Text Box, Label Button, Check Box, Radio Button Group Box Mouse & keyboard event handling August 1, 20127

4.Programming Transformations in C# i.2D graphics, rotation, translation, scaling, reflection, inversion and shearing ii.Representing 3D on 2D iii.3D transformations of a wireframe object such acube 5.Lines and curves i.parametric and implicit equations of lines, curves and conics in 2D and 3D systems. ( List given) ii.Bezier Curves and their properties 6.Morphing ( Tweening) i. introduction. ii. a simple 2D shape e.g. ‘H’ to a house drawing 7.Clipping i.Cohen-Sutherland Algorithm ii.Cyrus-Beck Algorithm Transformation of Figures Computer Graphics August 1, 20128

Transformation of Figures Computer Graphics 8. Advanced Features of C# i.A brief introduction to 2D transforms using System.Drawing.2D RotateTransform(angle) TranslateTransform(x-increment,y-increment) ScaleTransform(x-Factor, y-Factor) ResetTransform() ii.Image and Bitmap classes & Introduction To Image Processing Image image = Image.FromFile(“file Name”) g.DrawImage(image,x,y,image.Width, image.Height) image.Save(“File Name”, imageFormat) Bitmap bitmap = new Bitmap(“File Name”) bitmap = (Bitmap)Bitmap.FromFile(“File Name”) Color color = bitmap.GetPixel(x,y) bitmap.SetPixel(x,y,color) bitmap.Save (“File Name”, imageFormat) //ImageFormat.Png 9.Introducing Fractals i.Definition & Types ( slides )slides ii.Examples( Slides One, Two, Three )OneTwoThree August 1, 20129

The End Transformation of Figures Computer Graphics August 1,