ECM2410: Graphics and Animation - University of...

Post on 03-Apr-2018

221 views 3 download

Transcript of ECM2410: Graphics and Animation - University of...

ECM2410: Graphics and Animation

Dr. Peter Knaggs(Coordinator)

H/271

Dr. Jovisa ZunicH/282

ECM2410: Graphics and Animation

Dr. Peter Knaggs(Coordinator)

H/271

Dr. Jovisa ZunicH/282

ECM2410: Graphics and Animation

Dr. Peter Knaggs(Coordinator)

H/271

Dr. Jovisa ZunicH/282

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

Who and When

Lectures Lecture 1: Monday 3pm QUB/1GLecture 2: Tuesday 12-noon QUB/1G

Workshops Monday 1pm H/BlueMax Dupenois

Assessment CA 1 (15%) L02–06 TransformationsCA 2 (15%) L07–10 ClippingExamination (70%)

Administration Introduction 2/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Administration Introduction 3/23

Books

Hearn, Baker &Carithers

Computer Graphics(Prentice Hall)

2010

Knudsen

Java 2D Graphics(O’Reilly)

1999

Foley, van Dam,Feiner & Hughes

Computer Graphics:Principles and Practice(Addison-Wesley)

1997

Books Introduction 4/23

Books

Hearn, Baker &Carithers

Computer Graphics(Prentice Hall)

2010

Knudsen

Java 2D Graphics(O’Reilly)

1999

Foley, van Dam,Feiner & Hughes

Computer Graphics:Principles and Practice(Addison-Wesley)

1997

Books Introduction 4/23

Books

Hearn, Baker &Carithers

Computer Graphics(Prentice Hall)

2010

Knudsen

Java 2D Graphics(O’Reilly)

1999

Foley, van Dam,Feiner & Hughes

Computer Graphics:Principles and Practice(Addison-Wesley)

1997

Books Introduction 4/23

Books

Hearn, Baker &Carithers

Computer Graphics(Prentice Hall)

2010

Knudsen

Java 2D Graphics(O’Reilly)

1999

Foley, van Dam,Feiner & Hughes

Computer Graphics:Principles and Practice(Addison-Wesley)

1997

Books Introduction 4/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

More books

Computer Graphics with JavaGlenn Rowe, (Palgrave Macmillan), 2001

Computer Graphics Using Java 2D and 3DHong Zhang and Y. Daniel Liang, (Prentice Hall), 2007

3D Computer Graphics (3/e)Alan Watt, (Addison-Wesley), 2000

Computer Graphics, Mathematical First StepsPatricia Egerton and Bill Hall, (Prentice-Hall), 1998

Mathematics for Computer Graphics (3/e)John A. Vince, (Springer), 2010

Mathematical and Computer Programming Techniques for ComputerGraphicsPeter Comninos, (Springer), 2006

And many, many more, . . .Books Introduction 5/23

Computer Graphics

Display of computer output information in pictorialform (as opposed to textual)either

on a visual display unitor printeror plotter

Chandor, Dictionary of computers

Computer graphics is concerned with all aspects ofproducing pictures or images using a computer

Angel, Interactive computer graphics

Computer Graphics Introduction 6/23

Computer Graphics

Display of computer output information in pictorialform (as opposed to textual)either

on a visual display unitor printeror plotter

Chandor, Dictionary of computers

Computer graphics is concerned with all aspects ofproducing pictures or images using a computer

Angel, Interactive computer graphics

Computer Graphics Introduction 6/23

Computer Graphics

Display of computer output information in pictorialform (as opposed to textual)either

on a visual display unitor printeror plotter

Chandor, Dictionary of computers

Computer graphics is concerned with all aspects ofproducing pictures or images using a computer

Angel, Interactive computer graphics

Computer Graphics Introduction 6/23

Computer Graphics

Display of computer output information in pictorialform (as opposed to textual)either

on a visual display unitor printeror plotter

Chandor, Dictionary of computers

Computer graphics is concerned with all aspects ofproducing pictures or images using a computer

Angel, Interactive computer graphics

Computer Graphics Introduction 6/23

Computer Graphics

Display of computer output information in pictorialform (as opposed to textual)either

on a visual display unitor printeror plotter

Chandor, Dictionary of computers

Computer graphics is concerned with all aspects ofproducing pictures or images using a computer

Angel, Interactive computer graphics

Computer Graphics Introduction 6/23

Computer Graphics

Display of computer output information in pictorialform (as opposed to textual)either

on a visual display unitor printeror plotter

Chandor, Dictionary of computers

Computer graphics is concerned with all aspects ofproducing pictures or images using a computer

Angel, Interactive computer graphics

Computer Graphics Introduction 6/23

Examples: Films

Computer Graphics Introduction 7/23

Examples: Graphs and charts

1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

K

P(M

K|X

)

(a)

0.04 0.06 0.08 0.1 0.12−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

x1

x 2

(b)

Computer Graphics Introduction 8/23

Examples: Scientific visualisation

Computer Graphics Introduction 9/23

Examples: Plans, circuit diagrams

Computer Graphics Introduction 10/23

Examples: Maps

Computer Graphics Introduction 11/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Graphics Components

Shape of componentLines, boundariesAreas, regionsSymbols, markers, outlinesText

Appearance of componentColourSizeStyle

Computer Graphics Introduction 12/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Computer Graphics

We will not coverPainting and imaging packages (eg Photoshop)CAD packages (AutoCAD)Modelling packages (3D Studio Max, Blender)Rendering packages (Renderman)Graphics APIs (OpenGL)

We will look atGraphics program constructionGraphics programming algorithmsGraphics data structuresGeometry and representing graphical objectsBasic Animation

This Module Introduction 13/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Vector drawing – pen plotters

Pen is driven frompoint to point bysoftware instructionsProgramming isanalogous to manualdrawing:

moveTo(100, 100)penDown()lineTo(200, 200)lineTo(200, 100)

This Module Introduction 14/23

Raster displaysHardware

Display consists of arectangular array of pixels(picture elements) whoseintensity may be individuallyvaried.Framebuffer is an in-memorymap of the display; onememory location per pixel.Framebuffer may be addressedin any order (convenient), butis read-out to hardwaresequentially (efficient).

CoordinatesPictures/scenes specified in Cartesian coordinates (infiniteprecision), drawn on finite resolution displays.

RasterisationAlgorithms to convert infinite precision into pixels.

This Module Introduction 15/23

Raster displaysHardware

Display consists of arectangular array of pixels(picture elements) whoseintensity may be individuallyvaried.Framebuffer is an in-memorymap of the display; onememory location per pixel.Framebuffer may be addressedin any order (convenient), butis read-out to hardwaresequentially (efficient).

CoordinatesPictures/scenes specified in Cartesian coordinates (infiniteprecision), drawn on finite resolution displays.

RasterisationAlgorithms to convert infinite precision into pixels.

This Module Introduction 15/23

Raster displaysHardware

Display consists of arectangular array of pixels(picture elements) whoseintensity may be individuallyvaried.Framebuffer is an in-memorymap of the display; onememory location per pixel.Framebuffer may be addressedin any order (convenient), butis read-out to hardwaresequentially (efficient).

CoordinatesPictures/scenes specified in Cartesian coordinates (infiniteprecision), drawn on finite resolution displays.

RasterisationAlgorithms to convert infinite precision into pixels.

This Module Introduction 15/23

Raster displaysHardware

Display consists of arectangular array of pixels(picture elements) whoseintensity may be individuallyvaried.Framebuffer is an in-memorymap of the display; onememory location per pixel.Framebuffer may be addressedin any order (convenient), butis read-out to hardwaresequentially (efficient).

CoordinatesPictures/scenes specified in Cartesian coordinates (infiniteprecision), drawn on finite resolution displays.

RasterisationAlgorithms to convert infinite precision into pixels.

This Module Introduction 15/23

Raster displaysHardware

Display consists of arectangular array of pixels(picture elements) whoseintensity may be individuallyvaried.Framebuffer is an in-memorymap of the display; onememory location per pixel.Framebuffer may be addressedin any order (convenient), butis read-out to hardwaresequentially (efficient).

CoordinatesPictures/scenes specified in Cartesian coordinates (infiniteprecision), drawn on finite resolution displays.

RasterisationAlgorithms to convert infinite precision into pixels.

This Module Introduction 15/23

Raster displaysHardware

Display consists of arectangular array of pixels(picture elements) whoseintensity may be individuallyvaried.Framebuffer is an in-memorymap of the display; onememory location per pixel.Framebuffer may be addressedin any order (convenient), butis read-out to hardwaresequentially (efficient).

CoordinatesPictures/scenes specified in Cartesian coordinates (infiniteprecision), drawn on finite resolution displays.

RasterisationAlgorithms to convert infinite precision into pixels.

This Module Introduction 15/23

Raster displaysHardware

Display consists of arectangular array of pixels(picture elements) whoseintensity may be individuallyvaried.Framebuffer is an in-memorymap of the display; onememory location per pixel.Framebuffer may be addressedin any order (convenient), butis read-out to hardwaresequentially (efficient).

CoordinatesPictures/scenes specified in Cartesian coordinates (infiniteprecision), drawn on finite resolution displays.

RasterisationAlgorithms to convert infinite precision into pixels.

This Module Introduction 15/23

Coordinates and points

Cartesian coordinates

(3,2)

3

2

(0,0)

a

a =

(32

)

The Point class represents a 2-dimensional point or vector:a = new Point2D.Double(3.0, 2.0);double ax = a.getX(); // 3.0double ay = a.getY(); // 2.0

Coordinates, primitives & attributes Introduction 16/23

Coordinates and points

Cartesian coordinates

(3,2)

3

2

(0,0)

a a =

(32

)

The Point class represents a 2-dimensional point or vector:a = new Point2D.Double(3.0, 2.0);double ax = a.getX(); // 3.0double ay = a.getY(); // 2.0

Coordinates, primitives & attributes Introduction 16/23

Coordinates and points

Cartesian coordinates

(3,2)

3

2

(0,0)

a a =

(32

)

The Point class represents a 2-dimensional point or vector:a = new Point2D.Double(3.0, 2.0);double ax = a.getX(); // 3.0double ay = a.getY(); // 2.0

Coordinates, primitives & attributes Introduction 16/23

Coordinates and points

Cartesian coordinates

(3,2)

3

2

(0,0)

a a =

(32

)

The Point class represents a 2-dimensional point or vector:a = new Point2D.Double(3.0, 2.0);double ax = a.getX(); // 3.0double ay = a.getY(); // 2.0

Coordinates, primitives & attributes Introduction 16/23

Coordinates and points

Cartesian coordinates

(3,2)

3

2

(0,0)

a a =

(32

)

The Point class represents a 2-dimensional point or vector:a = new Point2D.Double(3.0, 2.0);double ax = a.getX(); // 3.0double ay = a.getY(); // 2.0

Coordinates, primitives & attributes Introduction 16/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Geometrical primitives

Objects are built from primitives

Ideal mathematical objectsSpecified by location anddimensionThought of as having zero width– rendered with attributesSimple, usually reflectinghardware capabilitiesPoint, line, boundary, text

Point Line

Boundary

Text

Recent APIs regard complicated shapes (eg Bezier curves) asprimitivesKnudsen for details of Java primitives

Coordinates, primitives & attributes Introduction 17/23

Primitives: Points

Primitive specification(x , y) coordinates of the point

Attributes

LinewidthColourSymbol

(x , y)

Coordinates, primitives & attributes Introduction 18/23

Primitives: Points

Primitive specification(x , y) coordinates of the point

Attributes

LinewidthColourSymbol

(x , y)

Coordinates, primitives & attributes Introduction 18/23

Primitives: Points

Primitive specification(x , y) coordinates of the point

Attributes

LinewidthColourSymbol

(x , y)

Coordinates, primitives & attributes Introduction 18/23

Primitives: Points

Primitive specification(x , y) coordinates of the point

Attributes

LinewidthColourSymbol

(x , y)

Coordinates, primitives & attributes Introduction 18/23

Primitives: Points

Primitive specification(x , y) coordinates of the point

Attributes

LinewidthColourSymbol

(x , y)

Coordinates, primitives & attributes Introduction 18/23

Primitives: Points

Primitive specification(x , y) coordinates of the point

Attributes

LinewidthColourSymbol

(x , y)

Coordinates, primitives & attributes Introduction 18/23

Primitives: Points

Primitive specification(x , y) coordinates of the point

Attributes

LinewidthColourSymbol

(x , y)

Coordinates, primitives & attributes Introduction 18/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Line segments

Primitive specification(x1, y1) and (x2, y2) coordinatesof the end points

AttributesLinewidthLinestyle:dashed, dotted, solid, etcColour

(x1, y1)

(x2, y2)

Coordinates, primitives & attributes Introduction 19/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Primitives: Boundaries

Rectangles and ellipses

Primitive specification(x , y) coordinates of bottomleft-hand cornerw , h width and height ofbounding box

AttributesLinewidth of boundaryLinestyle:dashed, dotted, solid, etcColour of boundaryColour of fillFill pattern

(x , y)

w

h

(x , y)

w

h

Coordinates, primitives & attributes Introduction 20/23

Java: Lines and Circles

public Line2D.Double(double X1, double Y1, double X2, double Y2)public Line2D.Double(Point2D p1, Point2D p2);

public Ellipse2D.Double(double x, double y, double w, double h)

// Draw a red line from (10,20) to (50,100)Graphics2D g2; // Graphics contextLine2D line = new Line2D.Double(10.0, 20.0, 50.0, 100.0);g2.setPaint(Color.red); // Set the colour attributeg2.setStroke(new BasicStroke(8)); // Line width 8 pixelsg2.draw(line); // Draw it

// Draw a green ellipse with a blue border from (100,100) and (50,50)Ellipse2D el = new Ellipse2D.Double(100.0, 100.0, 50.0, 50.0);g2.setPaint(Color.blue);g2.setStroke(new BasicStroke(1)); // A very thin border (1 pixel)g2.draw(el); // Draw boundaryg2.setPaint(Color.green)g2.fill(el); // Fill interior

Java Introduction 21/23

Java: Lines and Circles

public Line2D.Double(double X1, double Y1, double X2, double Y2)public Line2D.Double(Point2D p1, Point2D p2);

public Ellipse2D.Double(double x, double y, double w, double h)

// Draw a red line from (10,20) to (50,100)Graphics2D g2; // Graphics contextLine2D line = new Line2D.Double(10.0, 20.0, 50.0, 100.0);g2.setPaint(Color.red); // Set the colour attributeg2.setStroke(new BasicStroke(8)); // Line width 8 pixelsg2.draw(line); // Draw it

// Draw a green ellipse with a blue border from (100,100) and (50,50)Ellipse2D el = new Ellipse2D.Double(100.0, 100.0, 50.0, 50.0);g2.setPaint(Color.blue);g2.setStroke(new BasicStroke(1)); // A very thin border (1 pixel)g2.draw(el); // Draw boundaryg2.setPaint(Color.green)g2.fill(el); // Fill interior

Java Introduction 21/23

Java: Lines and Circles

public Line2D.Double(double X1, double Y1, double X2, double Y2)public Line2D.Double(Point2D p1, Point2D p2);

public Ellipse2D.Double(double x, double y, double w, double h)

// Draw a red line from (10,20) to (50,100)Graphics2D g2; // Graphics contextLine2D line = new Line2D.Double(10.0, 20.0, 50.0, 100.0);g2.setPaint(Color.red); // Set the colour attributeg2.setStroke(new BasicStroke(8)); // Line width 8 pixelsg2.draw(line); // Draw it

// Draw a green ellipse with a blue border from (100,100) and (50,50)Ellipse2D el = new Ellipse2D.Double(100.0, 100.0, 50.0, 50.0);g2.setPaint(Color.blue);g2.setStroke(new BasicStroke(1)); // A very thin border (1 pixel)g2.draw(el); // Draw boundaryg2.setPaint(Color.green)g2.fill(el); // Fill interior

Java Introduction 21/23

Java: Lines and Circles

public Line2D.Double(double X1, double Y1, double X2, double Y2)public Line2D.Double(Point2D p1, Point2D p2);

public Ellipse2D.Double(double x, double y, double w, double h)

// Draw a red line from (10,20) to (50,100)Graphics2D g2; // Graphics contextLine2D line = new Line2D.Double(10.0, 20.0, 50.0, 100.0);g2.setPaint(Color.red); // Set the colour attributeg2.setStroke(new BasicStroke(8)); // Line width 8 pixelsg2.draw(line); // Draw it

// Draw a green ellipse with a blue border from (100,100) and (50,50)Ellipse2D el = new Ellipse2D.Double(100.0, 100.0, 50.0, 50.0);g2.setPaint(Color.blue);g2.setStroke(new BasicStroke(1)); // A very thin border (1 pixel)g2.draw(el); // Draw boundaryg2.setPaint(Color.green)g2.fill(el); // Fill interior

Java Introduction 21/23

Java: Lines and Circles

public Line2D.Double(double X1, double Y1, double X2, double Y2)public Line2D.Double(Point2D p1, Point2D p2);

public Ellipse2D.Double(double x, double y, double w, double h)

// Draw a red line from (10,20) to (50,100)Graphics2D g2; // Graphics contextLine2D line = new Line2D.Double(10.0, 20.0, 50.0, 100.0);g2.setPaint(Color.red); // Set the colour attributeg2.setStroke(new BasicStroke(8)); // Line width 8 pixelsg2.draw(line); // Draw it

// Draw a green ellipse with a blue border from (100,100) and (50,50)Ellipse2D el = new Ellipse2D.Double(100.0, 100.0, 50.0, 50.0);g2.setPaint(Color.blue);g2.setStroke(new BasicStroke(1)); // A very thin border (1 pixel)g2.draw(el); // Draw boundaryg2.setPaint(Color.green)g2.fill(el); // Fill interior

Java Introduction 21/23

Java: Lines and Circles

public Line2D.Double(double X1, double Y1, double X2, double Y2)public Line2D.Double(Point2D p1, Point2D p2);

public Ellipse2D.Double(double x, double y, double w, double h)

// Draw a red line from (10,20) to (50,100)Graphics2D g2; // Graphics contextLine2D line = new Line2D.Double(10.0, 20.0, 50.0, 100.0);g2.setPaint(Color.red); // Set the colour attributeg2.setStroke(new BasicStroke(8)); // Line width 8 pixelsg2.draw(line); // Draw it

// Draw a green ellipse with a blue border from (100,100) and (50,50)Ellipse2D el = new Ellipse2D.Double(100.0, 100.0, 50.0, 50.0);g2.setPaint(Color.blue);g2.setStroke(new BasicStroke(1)); // A very thin border (1 pixel)g2.draw(el); // Draw boundaryg2.setPaint(Color.green)g2.fill(el); // Fill interior

Java Introduction 21/23

StringArt.java

Java Introduction 22/23

What and when

Lecture 1 Lecture 2

L01 Introduction Primitives & Modelling PKL02 Java 2D Transformations PKL03 Transformations Modelling and Java PKL04 Parametric Representations JZL05 Image Transforms Colour JZL06L07 Clipping Clipping PKL08 Rasterisation Rasterisation PKL09 Surface Modelling 3D Coordinate Systems JZL10 3D Rendering 3D Rendering JZL11 Animation Animation JZ

Lecture 1: Monday, 13am, QUB/1GLecture 2: Tuesday, 12-Noon, QUB/1G

Workshop: Monday, 1pm, HAR/Blue

Java Introduction 23/23