Next week will be great!
|
|
- Clyde Neal
- 6 years ago
- Views:
Transcription
1
2 Next week will be great! Three major things are happening next week: Zynga guest lecture Your game pitches (more details later) Christina Paxson
3 Feedback for M 1 Some of you had stacking shapes The stack probably exploded eventually Don t worry, stacking boxes is hard to do properly This week s lecture will help but not alleviate the problem
4 Feedback for M 1 Sometimes shapes would settle overlapping other shapes Two possible causes: Not translating enough Doing collision response before integration, hence drawing before translating
5 Announcements QUESTIONS?
6
7 M1 Collision Response You obtained MTV in M1, how did you use it? Move things out of collision Apply some impulse along MTV It probably worked most of the time, or only if you modeled specific behavior Other times the response is weird
8 Controlling Impulse Want more realistic collisions Two things to do: Support a range of collision behavior Determine the physically correct collision result Also need to be able to code it void oncollide(collision col) { Shape o1 = col.shape1; Shape o2 = col.shape2; Vec2f mtv = col.mtv; o1.move(mtv.smult(0.5f)); o2.move(mtv.smult(-0.5f)); } //code to calculate impulse o1.applyimpulse(imp1); o2.applyimpulse(imp2);
9 Property of physical entities Value between 0 and 1 0 is perfectly inelastic, 1 is perfectly elastic, etc. The coefficient of restitution (COR) between two entities is the geometric mean of their restitutions: COR = r 1 r 2 Restitution
10 Correct Collisions How do we find the physically correct collision response? i.e. given u a and u a, what are v a and v b? Use physical definition of the COR: COR = v a v b u a u b u a v a u b v b
11 Translation to Code Once we determine what the final velocities of the objects should, how do we apply this? Impulse or velocity setting? Setting velocity affects other collision response calculations v r = 1 r = 1 r = 1
12 Translation to Code We determined what the final velocities of the objects should, how do we apply this? Impulse > velocity setting Setting velocity affects other collision response calculations v
13 Translation to Code We determined what the final velocities of the objects should, how do we apply this? Impulse > velocity setting Setting velocity affects other collision response calculations v
14 Translation to Code We determined the final velocities of objects, what do we do with it? Impulse > velocity setting Setting velocity affects other collision response calculations Recall the definition of the impulse: mδv We really want the difference of final and initial velocity v
15 Final Velocities Conservation of momentum: m a u a + m b u b = m a v a + m b v b The COR equation can be rewritten as COR u a u b = v a v b So conservation of momentum becomes m a u a + m b u b = m a v a + m b (v a COR u a u b )
16 Solving for v a : Final Velocities v a = m au a +m b u b +m b COR(u b u a ) m a +m b Similarly for v b (reverse a and b basically): v b = m au a +m b u b +m a COR(u a u b ) m a +m b
17 Velocity Difference The velocity differences are: v a u a = m b(1+cor)(u b u a ) m a +m b v b u b = m a 1+COR m a +m b u a u b
18 Final Impulse So the impulse you want to apply is: I a = m(v a u a ) = m am b 1+COR m a +m b (u b u a ) I b = m(v b u b ) = m am b 1+COR m a +m b (u a u b ) You can see that they are equal and opposite, as we would expect
19 Static Shapes If object a is static, you can show that the equations in the last slide reduces to I a = m b (1 + COR) (u b u a ) I b = m b (1 + COR) (u a u b ) Vice-versa if object b is static You should special case this
20 Note about Velocity Note that all velocities in these equations are for the one-dimensional case But your 2D engine is 2D! Velocity only changes in the direction of the MTV So the v s and u s in the equations are the projection of velocity onto the MTV u b u a u a u b
21 Putting it all together Physically correct collision response: 1. Calculate COR with the restitutions of the shapes 2. Project velocities onto MTV 3. Apply impulse formula to calculate impulses 4. Apply corresponding impulse to each shape
22 Physics II QUESTIONS?
23
24 What is raycasting? Determine the first object that a ray hits A ray is like a ray of light, has a source and direction and goes on forever It s like a camera (or eye)
25 Raycasting Uses When would we need to raycast? Hitscan weapons Line of sight for AI Area of effect Rendering
26 The Ray A ray is a point (source) and a direction Point on ray given by: r = p + td p is the source point d is the direction This must be normalized! t is a scalar value (length) p d td
27 Raycasting boils down to finding the intersection of a ray and shapes Kind of like collision detection all over again You want the point of collision as well Basics
28 If the point is outside Project center onto ray Check if the projection is positive and the point is within the circle Point of intersection: p + (L Ray-Circle r 2 x 2 )d
29 Ray-Circle If the point is outside Project center onto ray Check if the projection is positive and the point is within the circle Point of intersection? p + (L r 2 x 2 )d p L
30 Ray-Circle If the point is outside Project center onto ray Check if the projection is positive and the point is within the circle Point of intersection? L r 2 x 2 p r 2 x 2 r x p + (L r 2 x 2 )d
31 Ray-Circle If the source point is inside the circle Do the same thing as if outside, but: p r 2 x 2 x r p + (L + r 2 x 2 )d Now L is allowed to be negative
32 Ray-Polygon/AAB A polygon/aab is composed of edges We can check for intersection of ray by checking for intersection of all edges There is no shortcut for AABs this time
33 Ray-Edge Edge is defined by two end points, a and b We need some other vectors: m is direction of the segment (normalized) n is the perpendicular to the segment (normalized) p d a m n b
34 Ray-Edge Firstly, determine if the segment straddles the ray Use cross products a p d and (b p) d must be of opposite sign Therefore no intersection if a p d b p d > 0 a p p d a m n b p b
35 Ray-Edge Secondly, determine if the two lines intersect Point of intersection a m n q = p + td q Solve for t t must be nonnegative! p b d
36 Ray-Edge Because q b lies on the segment m n q b n = 0 So plugging in: p + td b n = 0 a q td n = (b p) n t = (b p) n d n p d b
37 Intersect the ray with all the edges of the polygon Ray intersects polygon if it intersects at least 1 edge Keep track of the point that is closest to the source (the lowest value of t) Ray-Polygon
38 Raycasting: Putting it all together 1. Intersect ray with every shape in the world 1. For circles, use the circle-ray algorithm in the slides 2. For polygons, intersect each edge and use the closest 2. Keep track of closest intersection point from the source as well as the corresponding shape
39 Raycasting QUESTIONS?
40
41 Overview Can be any 2D game and engine You can work in groups if you want Each person is responsible for 10 points worth of new engine features More members in a group means more engine features More details in the final project handout
42 4 main parts: Week 1: Idea Week 2: Form groups and get approved Week 3: Design Weeks 4-8: Code, playtest, polish, present Timeline
43 A ½ to 1 page document Week 1: Idea Describe basic gameplay idea How is your game fun? Describe engine feature(s) you plan on implementing Give a 60-second elevator pitch of your game in class
44 Week 2: Groups Form a group (or decide to work alone) Finalize game and engine features Each group must meet with a TA to present the following: A more polished idea of the game Breakdown of member responsibilities for engine
45 Week 3: Design Research new engine features Design the engine and game Exact breakdown of member responsibilities Choose someone s engine to use or integrate engines For groups of 3 or more Explain how you will use version control
46 Week 4: Weeks 4-8 Engine should be mostly done Game exists Week 5: Engine should be done Game is playable 5 playtests per member from people not in CS195n
47 Week 6: Weeks 4-8 Game should be mostly done 5 more playtests per member from outsiders Week 7: Game should be done 5 playtests per member Powerpoint slideshow for postmortem presentation
48 Week 8: Weeks 4-8 Polish up your game, bug fixes, etc Create an executable and put it in /contrib Make a video demo of your game from gameplay footage It is now December 19 th And then you re done!
49 Final Project Overview QUESTIONS?
50
51 Raycasting Groups Similar to collision groups Some objects shouldn t be raycasted on, just like some objects are not meant to be collided Special case: the source If you re raycasting from a shape, you don t want to check the shape itself
52 Jumping Properly Extra requirement this week: player can jump once iff standing on a solid object Use information from your collision response object! If the MTV points downwards, then the player has hit something solid below it Player is now allowed to jump
53 Fixed Timestep Most of you will have noticed weird behavior when you fullscreen/resize It screws around with the nanossinceprevtick Solution: fixed timestep Give the physics world some constant time when ticking Tick as many times as possible on each game tick
54 Tips for M II JAVA TIP OF THE WEEK
55 Methods of Object Object has a few methods that you should know/care about: hashcode() equals(object o) tostring() public class Object { int hashcode(); boolean equals(object obj){ return (this == obj); } Object clone(); String tostring(); }
56 tostring Called whenever you use the object as a string You should override this in your classes to return meaningful strings It s worth doing if you debug with printlines See Vec2f for examples public class Object { public String tostring(){ return getclass().getname() + hashcode(); } } public class PhoneNumber { public String tostring(){ return ( + _areacode + ) + _number; } }
57 equals Determines if object is equal to another object The default method compares references Doesn t work if you want equal but not the same object (e.g. String) public class Object { boolean equals(object obj){ return (this == obj); } }
58 equals To override: Use default check first Check if instanceof Cast to object Compare things You can access fields directly! public class Book { String author; String title; boolean equals(object obj){ if (this == obj) return true; if (!(obj instanceof Book)) return false; Book o = (Book) obj; return o.author.equals(author) && o.title.equals(title); } }
59 Contract of equals A few things must be true about your equals(): o.equals(o) must be true o.equals(null) is always false must be symmetric must be transitive o1.equals(o2) changes only if o1 or o2 changes public class Book { String author; String title; boolean equals(object obj){ if (this == obj) return true; if (!(obj instanceof Book)) return false; Book o = (Book) obj; return o.author.equals(author) && o.title.equals(title); } }
60 hashcode Returns the hash of the object This value is used by Java s Map data structures You must override hashcode if you override equals Otherwise data structures can do weird things public class Object { } public int hashcode();
61 Contract of hashcode hashcode must return the same value for the same object unless it is changed If two objects are equal, they have the same hashcode If two objects are unequal, ideally they will have different hashcode public class Object { } public int hashcode();
62 Overriding hashcode Many ways of actually calculating hash of an object You can look them up if you want public int hashcode(){ int hash = 5; //prime int prime = 89; //prime hash = prime*hash + x; hash = prime*hash + y; hash = prime*hash + z; return hash; }
63 Tips for M II QUESTIONS?
64
Level Editor. Should be stable (as of Sunday) Will be updating the source code if you want to make tweaks to it for your final
Level Editor Should be stable (as of Sunday) Will be updating the source code if you want to make tweaks to it for your final Spoooooky Three checkpoints due next week M III Tac V Final I Good news! Playtesting
More informationLECTURE 7. Announcements
LECTURE 7 Announcements Minecraft 4 Feedback Looks good! A game that minimally involves platforms Not based on any game in particular Super Mario 64? Team Fortress 2? Completely up to you to make unique
More informationLECTURE 6. Announcements
LECTURE 6 Announcements Minecraft 3 Feedback Infinite worlds! Terrain looks good Gameplay not super varied Happy Birthday Hassan! The Voxel Engine You re done with your first collision engine! Environment
More informationLECTURE 5. Announcements
LECTURE 5 Announcements Falling Behind? Talk to us You still pass the class if you hand in all projects at the end of the semester Hand in even if you think you won t satisfy the playtesting requirements
More informationTac4 Feedback. TAs need to be able to beat your game to grade it. Add an easy mode Let us cheat
Tac4 Feedback TAs need to be able to beat your game to grade it Add an easy mode Let us cheat Mid-Semester Feedback Forms Tell us how we re doing Please fill them out! Important for the rest of the semester
More informationLECTURE 5. Announcements
LECTURE 5 Announcements Falling Behind? Talk to us Number of retries / grading policy slightly different this year You still pass the class if you hand in all projects at the end of the semester Hand in
More informationMinecraft Due: March. 6, 2018
CS1950U Topics in 3D Game Engine Development Barbara Meier Minecraft Due: March. 6, 2018 Introduction In this assignment you will build your own version of one of the most popular indie games ever: Minecraft.
More informationThe class Object. Lecture CS1122 Summer 2008
The class Object http://www.javaworld.com/javaworld/jw-01-1999/jw-01-object.html Lecture 10 -- CS1122 Summer 2008 Review Object is at the top of every hierarchy. Every class in Java has an IS-A relationship
More informationC12a: The Object Superclass and Selected Methods
CISC 3115 TY3 C12a: The Object Superclass and Selected Methods Hui Chen Department of Computer & Information Science CUNY Brooklyn College 10/4/2018 CUNY Brooklyn College 1 Outline The Object class and
More informationLECTURE 4. Announcements
LECTURE 4 Announcements Retries Email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your grader email your
More informationCS/ENGRD 2110 SPRING Lecture 7: Interfaces and Abstract Classes
CS/ENGRD 2110 SPRING 2019 Lecture 7: Interfaces and Abstract Classes http://courses.cs.cornell.edu/cs2110 1 Announcements 2 A2 is due Thursday night (14 February) Go back to Lecture 6 & discuss method
More informationViewing and Ray Tracing
Viewing and Ray Tracing CS 4620 Lecture 4 2018 Steve Marschner 1 Projection To render an image of a 3D scene, we project it onto a plane Most common projection type is perspective projection 2018 Steve
More informationEquality for Abstract Data Types
Object-Oriented Design Lecture 4 CSU 370 Fall 2008 (Pucella) Tuesday, Sep 23, 2008 Equality for Abstract Data Types Every language has mechanisms for comparing values for equality, but it is often not
More informationMinecraft Due: Mar. 1, 2015
CS1972 Topics in 3D Game Engine Development Barbara Meier Minecraft Due: Mar. 1, 2015 Introduction In this assignment you will build your own version of one of the most popular indie games ever: Minecraft.
More informationViewing and Ray Tracing. CS 4620 Lecture 4
Viewing and Ray Tracing CS 4620 Lecture 4 2014 Steve Marschner 1 Projection To render an image of a 3D scene, we project it onto a plane Most common projection type is perspective projection 2014 Steve
More informationCollisions/Reflection
Collisions/Reflection General Collisions The calculating whether or not two 2D objects collide is equivalent to calculating if the two shapes share a common area (intersect). For general polygons this
More informationHash tables. hashing -- idea collision resolution. hash function Java hashcode() for HashMap and HashSet big-o time bounds applications
hashing -- idea collision resolution Hash tables closed addressing (chaining) open addressing techniques hash function Java hashcode() for HashMap and HashSet big-o time bounds applications Hash tables
More informationInheritance. Lecture 11 COP 3252 Summer May 25, 2017
Inheritance Lecture 11 COP 3252 Summer 2017 May 25, 2017 Subclasses and Superclasses Inheritance is a technique that allows one class to be derived from another. A derived class inherits all of the data
More informationThe Java Type System (continued)
Object-Oriented Design Lecture 5 CSU 370 Fall 2007 (Pucella) Friday, Sep 21, 2007 The Java Type System (continued) The Object Class All classes subclass the Object class. (By default, this is the superclass
More informationVirtual Environments
ELG 524 Virtual Environments Jean-Christian Delannoy viewing in 3D world coordinates / geometric modeling culling lighting virtualized reality collision detection collision response interactive forces
More informationUnit 1, Lesson 1: Moving in the Plane
Unit 1, Lesson 1: Moving in the Plane Let s describe ways figures can move in the plane. 1.1: Which One Doesn t Belong: Diagrams Which one doesn t belong? 1.2: Triangle Square Dance m.openup.org/1/8-1-1-2
More informationFall 2017 Mentoring 9: October 23, Min-Heapify This. Level order, bubbling up. Level order, bubbling down. Reverse level order, bubbling up
CSM B Heaps & Hashing Fall 0 Mentoring : October 3, 0 Min-Heapify This. In general, there are 4 ways to heapify. Which ways actually work? Level order, bubbling up Level order, bubbling down Reverse level
More informationJava: advanced object-oriented features
Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: advanced object-oriented features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Packages
More informationSuper-Classes and sub-classes
Super-Classes and sub-classes Subclasses. Overriding Methods Subclass Constructors Inheritance Hierarchies Polymorphism Casting 1 Subclasses: Often you want to write a class that is a special case of an
More informationCSE 331 Spring 2018 Midterm
CSE 331 Spring 2018 Midterm Name There are 8 questions worth a total of 93 points. Please budget your time so that you get as many points as possible. We have done our best to make a test that folks can
More informationThis is the last lecture!
This is the last lecture! Email the TA list if you need more help Next week is final presentations during normal class time Super deadline day shortly after (12/17) Might want to hand in everything earlier
More informationQUEEN MARY, UNIVERSITY OF LONDON DCS128 ALGORITHMS AND DATA STRUCTURES Class Test Monday 27 th March
QUEEN MARY, UNIVERSITY OF LONDON DCS128 ALGORITHMS AND DATA STRUCTURES Class Test Monday 27 th March 2006 11.05-12.35 Please fill in your Examination Number here: Student Number here: MODEL ANSWERS All
More informationLab 4: Super Sudoku Solver CSCI 2101 Fall 2017
Due: Wednesday, October 18, 11:59 pm Collaboration Policy: Level 1 Group Policy: Pair-Optional Lab 4: Super Sudoku Solver CSCI 2101 Fall 2017 In this week s lab, you will write a program that can solve
More informationChapter 11: Collections and Maps
Chapter 11: Collections and Maps Implementing the equals(), hashcode() and compareto() methods A Programmer's Guide to Java Certification (Second Edition) Khalid A. Mughal and Rolf W. Rasmussen Addison-Wesley,
More informationCOS226 - Spring 2018 Class Meeting # 13 March 26, 2018 Inheritance & Polymorphism
COS226 - Spring 2018 Class Meeting # 13 March 26, 2018 Inheritance & Polymorphism Ibrahim Albluwi Composition A GuitarString has a RingBuffer. A MarkovModel has a Symbol Table. A Symbol Table has a Binary
More informationNo more engine requirements! From now on everything you work on is designed by you. Congrats!
No more engine requirements! From now on everything you work on is designed by you Congrats! Design check required Ben: Thursday 2-4 David: Thursday 8-10 Jeff: Friday 2-4 Tyler: Friday 4-6 Final III Don
More informationMITOCW MIT6_172_F10_lec18_300k-mp4
MITOCW MIT6_172_F10_lec18_300k-mp4 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for
More informationRay Tracing Basics I. Computer Graphics as Virtual Photography. camera (captures light) real scene. photo. Photographic print. Photography: processing
Ray Tracing Basics I Computer Graphics as Virtual Photography Photography: real scene camera (captures light) photo processing Photographic print processing Computer Graphics: 3D models camera model (focuses
More informationDomain-Driven Design Activity
Domain-Driven Design Activity SWEN-261 Introduction to Software Engineering Department of Software Engineering Rochester Institute of Technology Entities and Value Objects are special types of objects
More informationCS/ENGRD 2110 FALL Lecture 6: Consequence of type, casting; function equals
CS/ENGRD 2110 FALL 2018 Lecture 6: Consequence of type, casting; function equals http://courses.cs.cornell.edu/cs2110 Overview references in 2 Quick look at arrays: array Casting among classes cast, object-casting
More informationAdvanced Programming - JAVA Lecture 4 OOP Concepts in JAVA PART II
Advanced Programming - JAVA Lecture 4 OOP Concepts in JAVA PART II Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Ad hoc-polymorphism Outline Method overloading Sub-type Polymorphism Method overriding Dynamic
More informationUse the Move tool to drag A around and see how the automatically constructed objects (like G or the perpendicular and parallel lines) are updated.
Math 5335 Fall 2015 Lab #0: Installing and using GeoGebra This semester you will have a number of lab assignments which require you to use GeoGebra, a dynamic geometry program. GeoGebra lets you explore
More informationProgramming Languages and Techniques (CIS120)
Programming Languages and Techniques (CIS120) Lecture 37 April 22, 2016 Encapsulation & Hashing How is the Game Project going so far? 1. not started 2. got an idea 3. submitted design proposal 4. started
More informationToday. Reading. Homework. Lecture Notes CPSC 224 (Spring 2012) hashcode() method. Collections class. Ch 9: hw 7 out (due in a week)
Today hashcode() method Collections class Reading Ch 9: 406-424 Homework hw 7 out (due in a week) S. Bowers 1 of 9 The Object hashcode() function The signature: public int hashcode() What it does: returns
More informationLecture 16: HashTables 10:00 AM, Mar 2, 2018
CS18 Integrated Introduction to Computer Science Fisler, Nelson Lecture 16: HashTables 10:00 AM, Mar 2, 2018 Contents 1 Speeding up Lookup 1 2 Hashtables 2 2.1 Java HashMaps.......................................
More informationPSE Game Physics. Session (3) Springs, Ropes, Linear Momentum and Rotations. Oliver Meister, Roland Wittmann
PSE Game Physics Session (3) Springs, Ropes, Linear Momentum and Rotations Oliver Meister, Roland Wittmann 08.05.2015 Session (3) Springs, Ropes, Linear Momentum and Rotations, 08.05.2015 1 Outline Springs
More informationBasics of Computational Geometry
Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals
More informationLecture 5: Implementing Lists, Version 1
CS18 Integrated Introduction to Computer Science Fisler, Nelson Lecture 5: Implementing Lists, Version 1 Contents 1 Implementing Lists 1 2 Methods 2 2.1 isempty...........................................
More informationPhotorealism: Ray Tracing
Photorealism: Ray Tracing Reading Assignment: Chapter 13 Local vs. Global Illumination Local Illumination depends on local object and light sources only Global Illumination at a point can depend on any
More informationMovie: Geri s Game. Announcements. Ray Casting 2. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available
Now Playing: Movie: Geri s Game Pixar, 1997 Academny Award Winner, Best Short Film Quicksand Under Carpet New Radiant Storm King from Leftover Blues: 1991-003 Released 004 Ray Casting Rick Skarbez, Instructor
More informationCMSC131. Inheritance. Object. When we talked about Object, I mentioned that all Java classes are "built" on top of that.
CMSC131 Inheritance Object When we talked about Object, I mentioned that all Java classes are "built" on top of that. This came up when talking about the Java standard equals operator: boolean equals(object
More informationCollision handling: detection and response
Collision handling: detection and response Collision handling overview Detection Discrete collision detection Convex polygon intersection test General polygon intersection test Continuous collision detection
More informationSolutions to Quiz 1 (March 14, 2016)
MIT 6.005: Software Construction Max Goldman revised Wednesday 16 th March, 2016, 14:08 Solutions to Quiz 1 (March 14, 2016) Problem 1 (Multiple Choice) (20 points). (a) Which of the following must be
More informationLecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees
Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public
More informationNote that ALL of these points are Intercepts(along an axis), something you should see often in later work.
SECTION 1.1: Plotting Coordinate Points on the X-Y Graph This should be a review subject, as it was covered in the prerequisite coursework. But as a reminder, and for practice, plot each of the following
More informationMovie: For The Birds. Announcements. Ray Tracing 1. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available
Now Playing: Movie: For The Birds Pixar, 2000 Liar Built To Spill from You In Reverse Released April 11, 2006 Ray Tracing 1 Rick Skarbez, Instructor COMP 575 November 1, 2007 Announcements Programming
More informationCS/ENGRD 2110 FALL Lecture 7: Interfaces and Abstract Classes
CS/ENGRD 2110 FALL 2017 Lecture 7: Interfaces and Abstract Classes http://courses.cs.cornell.edu/cs2110 1 Announcements 2 A2 is due tomorrow night (17 February) Get started on A3 a method every other day.
More informationSimulation in Computer Graphics. Deformable Objects. Matthias Teschner. Computer Science Department University of Freiburg
Simulation in Computer Graphics Deformable Objects Matthias Teschner Computer Science Department University of Freiburg Outline introduction forces performance collision handling visualization University
More informationPong in Unity a basic Intro
This tutorial recreates the classic game Pong, for those unfamiliar with the game, shame on you what have you been doing, living under a rock?! Go google it. Go on. For those that now know the game, this
More informationCSE 331 Software Design & Implementation
CSE 331 Software Design & Implementation Hal Perkins Spring 2016 Identity, equals, and hashcode (Based on slides by Mike Ernst, Dan Grossman, David Notkin, Hal Perkins, Zach Tatlock) Object equality A
More informationParticle systems, collision detection, and ray tracing. Computer Graphics CSE 167 Lecture 17
Particle systems, collision detection, and ray tracing Computer Graphics CSE 167 Lecture 17 CSE 167: Computer graphics Particle systems Collision detection Ray tracing CSE 167, Winter 2018 2 Particle systems
More information1.00/1.001 Introduction to Computers and Engineering Problem Solving. Final Exam
1.00/1.001 Introduction to Computers and Engineering Problem Solving Final Exam Name: Email Address: TA: Section: You have three hours to complete this exam. For coding questions, you do not need to include
More informationExpected properties of equality
Object equality CSE 331 Software Design & Implementation Dan Grossman Spring 2015 Identity, equals, and hashcode (Based on slides by Mike Ernst, Dan Grossman, David Notkin, Hal Perkins) A simple idea??
More informationQuiz 1 (March 14, 2016)
MIT 6.005: Software Construction Max Goldman revised Sunday 13 th March, 2016, 15:30 Quiz 1 (March 14, 2016) Your name: Your Athena username: You have 50 minutes to complete this quiz. It contains 12 pages
More informationINHERITANCE. Spring 2019
INHERITANCE Spring 2019 INHERITANCE BASICS Inheritance is a technique that allows one class to be derived from another A derived class inherits all of the data and methods from the original class Suppose
More informationToday. Book-keeping. Inheritance. Subscribe to sipb-iap-java-students. Slides and code at Interfaces.
Today Book-keeping Inheritance Subscribe to sipb-iap-java-students Interfaces Slides and code at http://sipb.mit.edu/iap/java/ The Object class Problem set 1 released 1 2 So far... Inheritance Basic objects,
More informationNumber- Algebra. Problem solving Statistics Investigations
Place Value Addition, Subtraction, Multiplication and Division Fractions Position and Direction Decimals Percentages Algebra Converting units Perimeter, Area and Volume Ratio Properties of Shapes Problem
More informationChapter 5. Projections and Rendering
Chapter 5 Projections and Rendering Topics: Perspective Projections The rendering pipeline In order to view manipulate and view a graphics object we must find ways of storing it a computer-compatible way.
More informationGraphical Analysis. Figure 1. Copyright c 1997 by Awi Federgruen. All rights reserved.
Graphical Analysis For problems with 2 variables, we can represent each solution as a point in the plane. The Shelby Shelving model (see the readings book or pp.68-69 of the text) is repeated below for
More informationCOMP200 INHERITANCE. OOP using Java, from slides by Shayan Javed
1 1 COMP200 INHERITANCE OOP using Java, from slides by Shayan Javed 2 Inheritance Derive new classes (subclass) from existing ones (superclass). Only the Object class (java.lang) has no superclass Every
More informationBasic Triangle Congruence Lesson Plan
Basic Triangle Congruence Lesson Plan Developed by CSSMA Staff Drafted August 2015 Prescribed Learning Outcomes: Introduce students to the concept of triangle congruence and teach them about the congruency
More informationCSE 331 Software Design & Implementation
CSE 331 Software Design & Implementation Kevin Zatloukal Summer 2017 Identity, equals, and hashcode (Based on slides by Mike Ernst, Dan Grossman, David Notkin, Hal Perkins, Zach Tatlock) Overview Notions
More informationMathematics 308 Geometry. Chapter 9. Drawing three dimensional objects
Mathematics 308 Geometry Chapter 9. Drawing three dimensional objects In this chapter we will see how to draw three dimensional objects with PostScript. The task will be made easier by a package of routines
More informationAbstract Classes and Interfaces
Abstract Classes and Interfaces Reading: Reges and Stepp: 9.5 9.6 CSC216: Programming Concepts Sarah Heckman 1 Abstract Classes A Java class that cannot be instantiated, but instead serves as a superclass
More informationBuilding Java Programs. Inheritance and Polymorphism
Building Java Programs Inheritance and Polymorphism Input and output streams stream: an abstraction of a source or target of data 8-bit bytes flow to (output) and from (input) streams can represent many
More informationRay Tracing Part 1. CSC418/2504 Introduction to Computer Graphics. TA: Muhammed Anwar & Kevin Gibson
Ray Tracing Part 1 CSC418/2504 Introduction to Computer Graphics TA: Muhammed Anwar & Kevin Gibson Email: manwar@cs.toronto.edu Overview Introduction / Motivation Rasterization vs Ray Tracing Basic Pseudocode
More informationDamaging, Attacking and Interaction
Damaging, Attacking and Interaction In this tutorial we ll go through some ways to add damage, health and interaction to our scene, as always this isn t the only way, but it s the way I will show you.
More informationMAT 3670: Lab 3 Bits, Data Types, and Operations
MAT 3670: Lab 3 Bits, Data Types, and Operations Background In previous labs, we have used Turing machines to manipulate bit strings. In this lab, we will continue to focus on bit strings, placing more
More informationProgramming Project 1
Programming Project 1 Handout 6 CSCI 134: Fall, 2016 Guidelines A programming project is a laboratory that you complete on your own, without the help of others. It is a form of take-home exam. You may
More informationRay Tracing I. Internet Raytracing Competition
History Ray Tracing came from the Physics of lens making. The process was that of drawing lines or rays through a glass shape to determine it s lens properties. It is also related to early perspective
More informationThe Object Class. java.lang.object. Important Methods In Object. Mark Allen Weiss Copyright 2000
The Object Class Mark Allen Weiss Copyright 2000 1/4/02 1 java.lang.object All classes either extend Object directly or indirectly. Makes it easier to write generic algorithms and data structures Makes
More information1 EquationsofLinesandPlanesin 3-D
1 EquationsofLinesandPlanesin 3-D Recall that given a point P (a, b, c), one can draw a vector from the origin to P. Such a vector is called the position vector of the point P and its coordinates are a,
More informationReview. CSE 143 Java. A Magical Strategy. Hash Function Example. Want to implement Sets of objects Want fast contains( ), add( )
Review CSE 143 Java Hashing Want to implement Sets of objects Want fast contains( ), add( ) One strategy: a sorted list OK contains( ): use binary search Slow add( ): have to maintain list in sorted order
More informationASSIGNMENT 2. COMP-202A, Fall 2011, All Sections. Due: Monday, October 17th, 2011 (23:30)
ASSIGNMENT 2 COMP-202A, Fall 2011, All Sections Due: Monday, October 17th, 2011 (23:30) Please read the entire pdf before starting. The bottom has important instructions for how to test your code before
More informationCS112 Lecture: Making Choices
CS112 Lecture: Making Choices Objectives: Last revised 1/19/06 1. To review the Java if and if... statements 2. To introduce relational expressions and boolean operators 3. To discuss nested if statements
More informationProblem Solving for Intro to Computer Science
Problem Solving for Intro to Computer Science The purpose of this document is to review some principles for problem solving that are relevant to Intro to Computer Science course. Introduction: A Sample
More informationHomework 3: Shading, Raytracing, and Image Processing
Computer Graphics CSE 457, Spring 1999 Craig Kaplan Douglas Zongker Homework 3: Shading, Raytracing, and Image Processing Received: Friday May 7, 1999 Due: Friday May 21, 1999 DIRECTIONS Please provide
More informationMaking New instances of Classes
Making New instances of Classes NOTE: revised from previous version of Lecture04 New Operator Classes are user defined datatypes in OOP languages How do we make instances of these new datatypes? Using
More informationTable of Contents. Questions or problems?
1 Introduction Overview Setting Up Occluders Shadows and Occlusion LODs Creating LODs LOD Selection Optimization Basics Controlling the Hierarchy MultiThreading Multiple Active Culling Cameras Umbra Comparison
More informationCSE373 Fall 2013, Second Midterm Examination November 15, 2013
CSE373 Fall 2013, Second Midterm Examination November 15, 2013 Please do not turn the page until the bell rings. Rules: The exam is closed-book, closed-note, closed calculator, closed electronics. Please
More informationAnnouncements. Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class. Computer Graphics
Announcements Midterms graded back at the end of class Help session on Assignment 3 for last ~20 minutes of class 1 Scan Conversion Overview of Rendering Scan Conversion Drawing Lines Drawing Polygons
More informationCIS 110 Introduction To Computer Programming. February 29, 2012 Midterm
CIS 110 Introduction To Computer Programming February 29, 2012 Midterm Name: Recitation # (e.g. 201): Pennkey (e.g. bjbrown): My signature below certifies that I have complied with the University of Pennsylvania
More informationAgenda. Introduction Curve implementation. Particle System. - Requirements -What are all those vectors? -Where should I put things?
Agenda Introduction Curve implementation - Requirements -What are all those vectors? -Where should I put things? Particle System - Requirements -What should I implement? - Suggestions - Cool forces Agenda
More informationPrime Time (Factors and Multiples)
CONFIDENCE LEVEL: Prime Time Knowledge Map for 6 th Grade Math Prime Time (Factors and Multiples). A factor is a whole numbers that is multiplied by another whole number to get a product. (Ex: x 5 = ;
More informationGlossary Common Core Curriculum Maps Math/Grade 6 Grade 8
Glossary Common Core Curriculum Maps Math/Grade 6 Grade 8 Grade 6 Grade 8 absolute value Distance of a number (x) from zero on a number line. Because absolute value represents distance, the absolute value
More informationCS/ENGRD 2110 FALL Lecture 6: Consequence of type, casting; function equals
1 CS/ENGRD 2110 FALL 2017 Lecture 6: Consequence of type, casting; function equals http://courses.cs.cornell.edu/cs2110 Overview ref in JavaHyperText 2 Quick look at arrays array Casting among classes
More informationA triangle that has three acute angles Example:
1. acute angle : An angle that measures less than a right angle (90 ). 2. acute triangle : A triangle that has three acute angles 3. angle : A figure formed by two rays that meet at a common endpoint 4.
More information(Refer Slide Time: 00:02:24 min)
CAD / CAM Prof. Dr. P. V. Madhusudhan Rao Department of Mechanical Engineering Indian Institute of Technology, Delhi Lecture No. # 9 Parametric Surfaces II So these days, we are discussing the subject
More informationSection 05: Solutions
Section 05: Solutions 1. Asymptotic Analysis (a) Applying definitions For each of the following, choose a c and n 0 which show f(n) O(g(n)). Explain why your values of c and n 0 work. (i) f(n) = 5000n
More informationBoolean Component. Chapter 1. Boolean Operations
Chapter 1. Boolean Component Component: The Boolean Component (BOOL), in the bool directory, performs Boolean operations on the model topology of bodies, first finding the intersections between bodies,
More informationIntroduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing
Lecture 11 Ray tracing Introduction Projection vs. ray tracing Projection Ray tracing Rendering Projection vs. ray tracing Projection Ray tracing Basic methods for image generation Major areas of computer
More information2. Getting Started When you start GeoGebra, you will see a version of the following window. 1
Math 5335 Fall 2018 Lab #0: Installing and using GeoGebra This semester you will have a number of lab assignments which require you to use GeoGebra, a dynamic geometry program. GeoGebra lets you explore
More informationTutorial: Using the UUCS Crowd Simulation Plug-in for Unity
Tutorial: Using the UUCS Crowd Simulation Plug-in for Unity Introduction Version 1.1 - November 15, 2017 Authors: Dionysi Alexandridis, Simon Dirks, Wouter van Toll In this assignment, you will use the
More informationUser Guide. for. JewelCAD Professional Version 2.0
User Guide Page 1 of 121 User Guide for JewelCAD Professional Version 2.0-1 - User Guide Page 2 of 121 Table of Content 1. Introduction... 7 1.1. Purpose of this document... 7 2. Launch JewelCAD Professional
More informationCEng 477 Introduction to Computer Graphics Fall 2007
Visible Surface Detection CEng 477 Introduction to Computer Graphics Fall 2007 Visible Surface Detection Visible surface detection or hidden surface removal. Realistic scenes: closer objects occludes the
More information