reading: Art & Science of Java, Ch. 9

Slides:



Advertisements
Similar presentations
2D Graphics Drawing Things. Graphics In your GUI, you might want to draw graphics E.g. draw lines, circles, shapes, draw strings etc The Graphics class.
Advertisements

Building Java Programs Supplement 3G Graphics Copyright (c) Pearson All rights reserved.
CS 280 Data Structures Professor John Peterson. Quiz 4 Recap Consider the following array: {2, 6, 7, 3, 4, 1, 5, 9}. Draw this in tree form and then show.
Copyright 2008 by Pearson Education Building Java Programs Graphics reading: Supplement 3G videos: Ch. 3G #1-2.
Copyright 2006 by Pearson Education 1 Building Java Programs Supplement 3G: Graphics.
Games. learning objectives o writing games! o understanding the built-in 2D game engine o events in games o using art (pictures, sounds)
CS 450: Computer Graphics PIXEL AdDRESSING AND OBJECT GEOMETRY
CSE 219 Computer Science III Images. HW1 Has been posted on Blackboard Making a Game of Life with limited options.
Copyright 2008 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-3: Loop Figures and Constants reading: self-checks: 27 exercises:
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
1 Building Java Programs Supplement 3G: Graphics These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may not be rehosted, sold,
Design What’s it used for?. You see art around you every day. This product design uses block lettering and simple elements of design to grab your attention.
Lecture 71 CS110 Lecture 8 February 19, 2004 Announcements –hw3 due tonight –hw4 available, due Thursday February 26 –exam Tuesday March 2 Agenda –questions.
Object-Oriented Software Engineering Using Threads and simple Animation.
CompSci Introduction to Jam’s Video Game Package.
CS305j Introduction to Computing Simple Graphics 1 Topic 11 Simple Graphics "What makes the situation worse is that the highest level CS course I've ever.
CompSci 44.1 Game Package Introduction to Jam’s Video Game Package.
CS314 - Bonus Topics. Debugging Q: How is debugging like real estate? A: It's all about location, location, location Setting breakpoints in Eclipse Using.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 22 Game Graphics.
Copyright 2008 by Pearson Education Building Java Programs Graphics reading: Supplement 3G videos: Ch. 3G #1-2.
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Five-Minute Review 1.What are the three data structures realized in the Java Collections Framework? 2.What is hashing used for, how does it work? 3.What.
Computer Science I Lab 1 ISMAIL ABUMUHFOUZ | CS 180.
CS 106A, Lecture 27 Final Exam Review 1
Basic Graphics Drawing Shapes 2.
Graphical Output Basic Images.
Pixels, Colors and Shapes
An Innovative Approach to the Technology Itch
Adapted from slides by Marty Stepp and Stuart Reges
Agenda Warmup Prep for Core #1 Lesson G2 (RGB, Loops in Graphics)
Chapter 11—Arrays and ArrayLists
Emerging Platform#1: Processing 3
Review.
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Beyond Console Programs
Objective of the lesson
reading: Art & Science of Java,
Basic Graphics Drawing Shapes 1.
CS 106A, Lecture 12 More Graphics
CS 106A, Lecture 14 Events and Instance Variables
CS 106A, Lecture 22 More Classes
Building Java Programs
SSEA Computer Science: Track A
WICS - Flappy Anteater Python Tutorial
Objective of the lesson
Graphics.
Building Java Programs
CS 106A, Lecture 18 Practice with 1D and 2D Arrays
CS150 Introduction to Computer Science 1
Lecture 7: Introduction to Processing
Building Java Programs
CSc 110, Spring 2018 Lecture 10: More Graphics
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
CSc 110, Autumn 2017 Lecture 8: More Graphics
Building Java Programs
Software Engineering Lecture #29
Building Java Programs
Building Java Programs
Graphics Reading: Supplement 3G
Translate 5 squares left and 4 squares up.
Do you think that computers should be included as art and if so why?
Building Java Programs
2D Shapes Rectangle Circle Triangle Rectangle. What shape is the door? Rectangle.
Presentation transcript:

reading: Art & Science of Java, Ch. 9 CS 106A, Lecture 13 Animation reading: Art & Science of Java, Ch. 9

HW4: Breakout Memory The River of Java You are here Events Animation Graphics Programs

Plan For Today Announcements Midterm Animation Practice: Animated Square Practice: DribbleCastle

Plan For Today Announcements Midterm Animation Practice: Animated Square Practice: DribbleCastle

Plan For Today Announcements Midterm Animation Practice: Animated Square Practice: DribbleCastle

Simple animation A Graphics program can be made to animate with a loop such as: public void run() { ... while (test) { update the position of shapes; pause(milliseconds); } The best number of ms to pause depends on the program. most video games ~= 50 frames/sec = 25ms pause

Graphical methods These methods in graphical objects can be useful for animation: The GraphicsProgram itself has these methods, too: Method Description obj.getX() the left x-coordinate of the shape obj.getY() the top y-coordinate of the shape obj.getWidth() number of pixels wide the shape is obj.getHeight() number of pixels tall the shape is obj.move(dx, dy); adjusts location by the given amount obj.setLocation(x, y); change the object's x/y position obj.setSize(w, h); change the object's width*height size getWidth() number of pixels wide the window is getHeight() number of pixels tall the window is setCanvasSize(w, h) change the canvas’s width*height size

Plan For Today Announcements Midterm Animation Practice: Animated Square Practice: DribbleCastle

Recap Announcements Midterm Animation Practice: Animated Square Practice: DribbleCastle Next Time: Interactive Graphics Programs