Java Graphics 2 4-1-2003. Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignment? zOffset between class.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

Computer Graphics (Spring 2008) COMS 4160, Lecture 6: Curves 1
CSC1401 Drawing in Java - 2. Reminder from last class How do you save your modified picture? String filename = …; Picture stevePicture = new Picture(filename);
1 of 25 Assignment Orthographic Wireframe Elevation Orthographic Wireframe Plan Orthographic Wireframe End-Elevation Perspective View.
Outline for Today More math… Finish linear algebra: Matrix composition
1 L38 Graphics and Java 2D™ (3). 2 OBJECTIVES In this chapter you will learn:  To understand graphics contexts and graphics objects.  To understand.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
Four simple expressions in meta. Data objects Pieces of data in a computer are called objects Today, we’ll talk about four kinds of objects Numbers Pictures.
Macromedia Fireworks MX 2004 – Design Professional WORKING WITH OBJECTS.
COMP236: Computer Graphics Spring’2000 Dinesh Manocha.
Agenda – Week 8, Day 1 Debrief from InDesign Transition to Flash/Animation Explore assignment Flash tutorials Lesson 1 - Workspace Lesson 2 - Drawing Lesson.
Week 14 - Wednesday.  What did we talk about last time?  Collision handling  Collision detection  Collision determination  Collision response  BSPs.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Introduction to Modeling. What is CG Modeling? Combination of Sculpting, Architecture, Drafting, and Painting. The core component of computer animation.
By: Zaiba Mustafa Copyright ©
CS324e - Elements of Graphics and Visualization Java2D Graphics.
Curve Modeling Bézier Curves
1 Review of COMPSCI 221  Chapters 1-11 in text  User Interfaces will be addressed as a take- home question.
Java ME & Blackberry APIs for Game Dev Week III. Overview Java 2D API Java 3D API SVG Blackberry APIs
Macromedia Fireworks 8 Revealed WORKING WITH OBJECTS.
3D Objects Subject:T0934 / Multimedia Programming Foundation Session:12 Tahun:2009 Versi:1/0.
Tutorial 2 Drawing Text, Adding Shapes, and Creating Symbols.
Graphics A graphics program allows you to combine pictures and text in many different ways. Features – General Level Draw graphics Enter Text Common Tools.
2D Graphics: Rendering Details
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
Recursion Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignment? zWhat is a recursive function?
Element. The element Used to dynamically draw graphics using javascript. Capable of drawing paths, circles, rectangles, text, and images.
Advanced User Interfaces with Java SD’98 - Session 3206 Ted Faison Faison Computing Inc.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 3 2D Graphics: Rendering Details.
Agenda – Week 8, Day 2 Tuesday Intro to Flash Animation process Computer animation Lesson 1 – Overview Lesson 2 – Drawing Lesson 4 – Layers Lesson 8 –
Java Graphics. Review 3 kinds of elements in components API? Layout managers Events Extend vs. Implement.
Java Graphics Stuart Hansen 11/6/03. What’s Wrong with OpenGL Graphics – not GUI –No real support of text boxes, buttons, etc. Procedural - not OOP –No.
Tutorial 2 Drawing Shapes, Adding Text, and Creating Symbols.
GUIs in Java Opening Discussion zHow did the project work out? How did you decide to tackle the problem? What pieces did you break it into?
Recursion Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignment? Don’t let problems hang.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
Aim: What is Adobe Illustrator?. Adobe Illustrator is a vector based drawing program.
CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 2008 Most Slides from Stephen Chenney.
2/17/04© University of Wisconsin, CS559 Spring 2004 Last Time Resampling –Ideal reconstruction –You can only ideally reconstruct band-limited functions.
Direct3D Workshop November 17, 2005 Workshop by Geoff Cagle Presented by Players 2 Professionals.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
Subject Name: Computer Graphics Subject Code: Textbook: “Computer Graphics”, C Version By Hearn and Baker Credits: 6 1.
Adobe Fireworks CS3 Revealed CHAPTER TWO: WORKING WITH OBJECTS.
Conditionals Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignment? zPass by value limitations.
Georgia Institute of Technology Drawing in Java – part 3 Barb Ericson Georgia Institute of Technology September 2006.
Creating Vectors – Part One 2.02 Understand Digital Vector Graphics.
Graphics Graphics & Graphical Programming Lecture 23 - Viewing & Clipping.
Advanced Java Screen Update Techniques SD’98 - Session 4406 Ted Faison Faison Computing Inc.
Graphics in Java Opening Discussion zDo you have any questions about the quiz? zWhat did we talk about last class? zDo you have any questions.
Digital Media Dr. Jim Rowan ITEC 2110 Vector Graphics II.
Georgia Institute of Technology Drawing in Java – part 2 Dr Usman Saeed Assistant Professor Faculty of Computing and Information Technology North Jeddah.
Main characteristics of Vector graphics  Vector graphics provide an elegant way of constructing digital images (diagrams, technical illustration and.
Applications and Rendering pipeline
Advanced AWT The Rendering Pipeline
Lecture 5 Basic geometric objects
Computer Graphics CC416 Week 15 3D Graphics.
3D Transformations Source & Courtesy: University of Wisconsin,
Graphic novel (Photoshop)
Fill and Stroke Stroke is the outline of a shape, text or image.
Java Graphics The basic rendering mechanism is the drawing system that controls when and how programs can draw on a graphics component. When a component.
2.02 Understand Digital Vector Graphics
Chapter Lessons Use the Macromedia Flash drawing tools
(c) 2002 University of Wisconsin, CS 559
Chapter 49 Java 2D.
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Creating Vectors – Part One
Creating Vectors – Part One
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Live Paint, Live Color, Swatches, Tracing
Presentation transcript:

Java Graphics

Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignment? zOffset between class topics and assignments. It wasn’t that way last semester.

Capabilities of Graphics2D zThe Java2D libraries add a significant amount of capabilities to the graphics package so that one can create very nice images with little effort. zThe basic functionality of the rendering pipeline though is just that it can draw of fill shapes and draw images. This simplicity combined with a bit of flexibility is what gives it its power.

Geometry zGraphics2D uses a powerful Shape class to represent almost everything that gets drawn. The shape is defined by a path, the edges of which can be straight lines or polynomial curves. zMany standard shapes are defined in java.awt.geom. You can also combine shapes to for areas of union, intersection, etc.

Painting and Stroking zA Shape defines some geometry, but not how it is drawn. How a shape is filled is defined by the painting settings. How it’s outline is drawn is given by the stroking settings. zStroking actually is reduced to painting. zPaint objects can be solid, gradients, or textures. Strokes can also have thickness and end styles set.

Rendering zOnce we have shapes defined and we know what style to draw them with we have to render this. That requires transforming, compositing, clipping, and giving hints. zCompositing decides how things are drawn on top of one another. Clipping can be done to any shape. Hints are beyond what we can talk about.

Affine Transformations zDrawing to a Java2D surface is done in a “user space” instead if in device space. We can specify transformations that are applied to all things that are drawn. These include translating, shearing, scaling, and rotating. zThis type of behavior is very standard in computer graphics and is typically done with matrix multiplications.

What I’ve Left Out zI haven’t covered anything dealing with text or images in Java2D. These go through much of the same rendering pipeline. Text is actually drawn as shapes. There are also a number of image processing tools included in the API. This gives you a lot of power, but might take a while to learn how to use properly.

Code zLet’s look again at the code that we have that uses Graphics2D. In addition, we will continue to write the code for polygons and think of what else we could add in to use the power of Java2D.

Minute Essay zHow might you use some of what we talked about today in your game? In particular, how could you use it for your game status panel? zAssignment #5 is due today. On Thursday we will venture into the realms of recursion again.