GTECH 731 Lab Session 9 11/2/10 Lab 7 – Geotools Review Lab 8 – Simple Agent Model Semester Project.

Slides:



Advertisements
Similar presentations
Solving 2-D Vectors Graphically
Advertisements

Rumor Routing in Sensor Networks David Braginsky and Deborah Estrin.
Perpendicular Lines Linear Equations.
Topographic Mapping Honors Earth Science Parkland High School.
GTECH 731 Lab Session 10 11/2/10 Lab 8 – Simple Agent Model Review Exploring ArcObjects Lab 9 – ArcObjects.
GTECH 731 Lab Session 10 11/2/10 Lab 9 – ArcObjects Pseudo-code Example.
Detailed Design Kenneth M. Anderson Lecture 21
GTECH 731 Lab Session 6 10/12/10 Quiz Review Lab 5 Review Lab 6 Intro.
GTECH 731 Lab Session 8 10/26/10 Lab 7 Geotools. Previous Labs Labs designed to gradually introduce C# and Visual Studio Started with simple, straight.
8-6 Vectors Holt McDougal Geometry Holt Geometry.
Vector addition, subtraction Fundamentals of 2-D vector addition, subtraction.
Chapter 2 Section 5 Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Presenting and Analyzing Data
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Robotics NXT sensors Back to Light sensor: red vs blue ball.
Geometry Vectors CONFIDENTIAL.
Lecture 2: Introduction to Concepts in Robotics
Wednesday-Thursday Physics Questions on Projectile project Test and Review Sheet More general 2 dimensional motion.
The Logical Structure of Algorithms. Algorithms Steps necessary to complete a task or solve a problem. Example: Recipe for baking a cake –Will contain.
MECHANICAL DRAWING.
1 CO Games Development 1 Week 6 Introduction To Pathfinding + Crash and Turn + Breadth-first Search Gareth Bellaby.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
Projectile Motion Chapter 3. Vector and Scalar Quantities Vector Quantity – Requires both magnitude and direction Velocity and Acceleration = vector quantities.
Distance. Euclidean Distance Minimum distance from a source (Value NoData) Input grid must have at least one source cell with the rest of the grid.
Vectors Part 2 Projectile Motion Vectors Part 2 PVHS Physics.
Math 5 Unit Review Instructor: Mrs. Tew Turner. In this lesson we will review for the unit assessment and learn test taking strategies.
Vector Quantities Vectors have ▫magnitude ▫direction Physical vector quantities ▫displacement ▫velocity ▫acceleration ▫force.
COSC 1P02 Introduction to Computer Science 3.1 Cosc 1P02 Week 3 Lecture slides Birthdays are good for you. Statistics show that the people who have the.
How to use a Compass.
Finding the Magnitude of a Vector A vector is a quantity that has both magnitude and direction. In this lesson, you will learn how to find the magnitude.
Mapping Our World: Globes Chapter 2. Your Experience with Maps Describe the various ways in which you have used maps. Why is it important to use a map?
Adding Vectors Vectors are ‘magnitudes’(ie: values) with a direction
Chapter 3 – Two Dimensional Motion and Vectors
Linear Motion Review.
Two-Dimensional Motion and VectorsSection 1 Preview Section 1 Introduction to VectorsIntroduction to Vectors Section 2 Vector OperationsVector Operations.
Pseudocode AStar. Heuristics - how to determine what's a good next step? As mentioned already, the A* algorithm depends on evaluating the best next step.
UNDERSTANDING MAPS Geographical Data Skills (Part 1)
5 Projectile Motion Projectile motion can be described by the horizontal and vertical components of motion.
Unit 6 3D Modeling Concepts
Vector Resolution Honors Physics.
8-6 Vectors Holt Geometry.
Geometry with Cosby Missy Cosby Okemos High School Math Instructor.
Computer Graphics Rendering 2D Geometry CO2409 Computer Graphics Week 2.
15-100: Introduction to Programming w/ Java * Ananda Gunawardena -- Lecture – School of Computer Science – Phone : (x81559) – Office: Wean Hall.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Scalar and vector quantities 1 Starter Put a cross in the centre of your graph paper (landscape)and draw the following movement: (1 pace = 1 cm) From.
Tuesday (10/1) Turn in: Staple your lab group’s data sheets from height lab. Place in top tray. Pick-up: Vector & Angle review Ws (complete for Warm-up)
Algorithms and Pseudocode
Physics Section 3.2 Resolve vectors into their components When a person walks up the side of a pyramid, the motion is in both the horizontal and vertical.
Components in photo journalism BY: KYLE COACH BY: SIR. FADERA.
T AXICAB G EOMETRY An exploration of Area and Perimeter Within city blocks.
Holt Geometry 8-6 Vectors Warm Up Find AB. 1. A(0, 15), B(17, 0) 2. A(–4, 2), B(4, –2) Solve each equation. Round to the nearest tenth or nearest degree.
App Inventor Chapter 17 – Creating Animated Apps.
Vectors AP Physics C.
8-6 Vectors Holt McDougal Geometry Holt Geometry.
Vector Resolution Level 1 Physics.
Copyright © 2008 by Helene G. Kershner
Lab 9 Intro to Robots.
What type of angle is it?.
Copyright © 2008 by Helene G. Kershner
Lesson 14.1: Angles Formed by Intersecting Lines
We use arrows to represent vectors.
How to Use a Compass PAD3O.
HW2 EE 562.
Vector Resolution.
Projectile Motion & Vectors
Vertical Angles, Linear Pairs, Exterior Angles
5 simple steps to using a compass
Vectors.
The scene. You are in the army and are part of the minesweeping core who control robots to help them find mines. You are currently in the in the desert.
Presentation transcript:

GTECH 731 Lab Session 9 11/2/10 Lab 7 – Geotools Review Lab 8 – Simple Agent Model Semester Project

Lab 7 – Geotools Created simple drawing package to create Points, Lines and Polygons Used Geotools geometry library instead of creating your own Used predefined classes to hold state of geometries Point, LineString, LinearRing and Polygon objects “GeometryFactory” to Instantiate objects Used predefined methods lstGeometries[i].GetGeometryType().Equals(“Point”) to determine current object in geometries list lstGeometries[i].GetNumPoints() to set size of temporary “draw” array lstGeometries[i].GetCoordinates() to return current set of coordinates for object curDrawGeometry.GetCoordinate().X to return current object coordinate

Lab 7 – Geotools Objects Don’t Draw Themselves Draw geometries using System.Graphics methods DrawEllipse, DrawLines, FillPolygon, DrawPolygon Methods take “System.Drawing” objects or X Y coordinate values as parameters – needed to convert from Geotools objects to “System.Drawing.Point” or X, Y coordinate values e.Graphics.DrawEllipse curDrawGeometry.GetCoordinate().X curDrawGeometry.GetCoordinate().Y e.Graphics.DrawLines, e.Graphics.FillPolygon and e.Graphics.DrawPolygon Take lists of System.Drawing.Point[] objects Looped through lists of “Geotools.Geometries.Geometry” assigning X, Y values to parallel lists of “System.Drawing.Point”

Lab 8 – Simple Agent Model Create simple Agent model Add “Pedestrian”, “Obstacle” and “Goal” objects to scene “Pedestrians” will move towards closest “Goal” “Obstacles” in scene block paths to goal Pedestrian object can detect when it hits an object Geotools objects used to hold state of Objects in scene Point – Goals and Pedestrians Polygon – Obstacles Useful functions in Pedestrian “Move” method.Distance() – to determine which goal is closest.Contains() – to detect object collision.Intersects() – to compare Pedestrian location to previous location

Lab 8 – Pseudo-Code Way to outline or design logical steps of program at higher more abstract level Independent of any programming language using human language to describe general algorithm or process to perform a task Leave out details not essential for human understanding of algorithm such as syntax or variables Focus on high level logic of program rather than language specifics or specific subroutines needed to carry out tasks Abstract example of “Drink Glass of Water Algorithm” 1.Pick-up glass 2.Lift glass to mouth 3.Drink from glass 4.Put glass down

Lab 8 – Pseudo-Code A bit more specific “Drink Glass of Water Algorithm” 1.Pick-up glass 1.Reach for glass 2.Clasp the glass 2.Lift glass to mouth 1.Rotate shoulder and wrist 2.Bend elbow 3.Drink from glass 1.Touch glass to lips and open mouth 2.Tilt glass and pour liquid into mouth 3.Un-tilt glass and close mouth 4.Swallow liquid 4.Put glass down 1.Un-rotate shoulder 2.Un-bend elbow 3.Un-clasp glass

Lab 8 – Pseudo-Code for Simple Agent Model 1.For each “time step” 1.Move each “Pedestrian” a single step Basic logic for the “Move” method is... 1.If there are goals and a goal has not been reached 1.Find the closest goal 2.Determine direction to that goal 3.While in old position 1.Move one step in selected direction 2.If object is hit 1.Move back to old position 2.Change selected direction

Lab 8 – Pseudo-Code More specific logic for the “Move” method is... 1.If there are goals and a goal has not been reached 1.Find the closest goal 1.Look at all of the goals and select the closest one 2.Determine direction to that goal 1.Calculate two component directions (vertical or horizontal) to the goal and select the longer of the 2 directions 3.While in old position 1.Move one step in selected direction 2.If object is hit 1.Move back to old position 2.Change selected direction 1.If moving North, move East 2.If moving East, move South 3.If moving South, move West 4.If moving West, move North

Lab 8 – Pseudo-Code Basic logic might not be sophisticated enough to negotiate obstacles 1.If there are goals and a goal has not been reached 1.Find the closest goal 2.Determine direction to that goal 1.Calculate angular route based on straight line to goal 3.While in old position 1.Move one step in selected direction 2.If object is hit 1.Move back to old position 2.Change selected direction 1.Move 90 degrees from last move? or 2.Move opposite 1 step and move 90 degrees from last move? or 3.Detect edge of object and move around? Don’t know what objects will look like, what angle of approach etc. Try to keep general enough to negotiate all possibilities

Semester Project Ideas For next week, write proposal of what you want to do for your semester project Build on what you have done Agent based model (ala Lab 8) Traffic pattern of people walking in an area but avoiding each other on their way to destination? Pigeons flying and clustering around their coops? More extensive drawing package Add/delete select/unselect any number of objects Give individual objects their own color and line thicknesses Move, scale rotate objects Intersect, union or other operation ???