—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-1 Day 5 Section 9 - Contiuous Simulation –Exercise 9 Section.

Slides:



Advertisements
Similar presentations
Chapter 13 Graphics classes Bjarne Stroustrup
Advertisements

Pages and boxes Building quick user interfaces. learning objectives o Build a quick UI with pages and boxes o understand how pages and boxes work o click.
Chapters 12 and 13 A Display Model and Graphics Classes John Keyser’s Modifications of Slides by Bjarne Stroustrup
—————————— CACI Products Company ————————————————————————————— SimScript II.5 —————————————— 3-1 Day 2 Section 3 - Introduction to Process Simulation –Modeling.
“The Handshake Problem” Problem Solving Ch 1. Shake Hands with Everyone Some things to think about: How many handshakes occurred? How did you keep track.
PIC Programming with Logicator
—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 9-1 Day 5 Section 9 - Continuous Simulation –Exercise 9 Section.
1 An intro to programming concepts with Scratch Session 3 of 10 sessions Repetition and variations.
1 Computer Graphics Week6 –Basic Transformations- Translation & Scaling.
Chapter 7: Vectors and the Geometry of Space
Scratch Programming Session 6 of 10 If-then-else statements interactions Final projects specifications.
A code-walkthrough Commentary on our ‘wfmodel.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
—————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— Day 1, Section 2 Problem Solution C:\Program Files\Simscript3\models\Heath2.
—————————— CACI Products Company ———————————————————————————— SimScript II.5 —————————————— 8-1 Day 4 Section 7 - Simulation Control –User Interface Forms.
—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 2-1 Day 1 Section 1 - The General Purpose Language –Overview.
A code-walkthrough Commentary on our ‘model3d.cpp’ demo-program – an initial ‘prototype’ for 3D wire-frame animations.
Web Page Development Identify elements of a Web Page Start Notepad
—————————— CACI Products Company ————————————————————————————— SimScript II.5 —————————————— 4-1 Day 2 Section 3 - Introduction to Process Simulation –Modeling.
PowerPoint Tutorial 1: Creating a Presentation
1 Flash and Animation Presented by : Behzad Sajed Khosrowshahi.
An Introduction to ASP.NET Web Pages 2 Module 1: Webmatrix Installation and Your First Web Site Tom Perkins.
8.3a-Vectors Terms Operations Practice Problems.
Scratch the Cat. Object Oriented Programing Writing computer programs Based on Objects Instead of Actions Based on Data Instead of Logic.
 A function is like a machine that excepts input values (x) and enacts a procedure on the input to produce an output (y).  We call the input values.
Line up By Melissa Dalis Professor Susan Rodger Duke University June 2011.
Power Point EDU 271 Microsoft PowerPoint is a powerful tool to create professional looking presentations and slide shows. PowerPoint allows you to construct.
1 CMT Fundamentals of Computer Graphics Revision Dr. Xiaohong Gao BG---Room 2C23 Week 11.
Code Club Session 2 Dance Party. What will we learn ?  How to change the background  How to create animations  How to make objects talk to each other.
Teacher/Mentor Institute Using easyC Joel Kirkland July 30-31, 2015.
Linear Motion Physics. Linear Motion Linear Motion refers to “motion in a line”. The motion of an object can be described using a number of different.
An Introduction to Designing and Executing Workflows with Taverna Katy Wolstencroft University of Manchester.
Chapter 10 Fireworks: Part II The Web Warrior Guide to Web Design Technologies.
Steps in simulation study 1. - Clearly understand problem - Reformulation of the problem 2. - Which questions should be answered? - Is simulation appropriate?
CS 450: COMPUTER GRAPHICS PORTRAIT OF AN OPENGL PROGRAM SPRING 2015 DR. MICHAEL J. REALE.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
Quiz Preparations1 QUIZ PREPARATION Prepare for Quiz and start thinking about the Final Project.
Programming games Show your version of Bo the dog. Start cannonball Preview: video, audio work session (cannonball) Homework: Cannonball with ball in a.
Motion in a Straight Line Position Velocity Acceleration.
Two-Dimensional Motion and VectorsSection 1 Preview Section 1 Introduction to VectorsIntroduction to Vectors Section 2 Vector OperationsVector Operations.
Concept Summary Batesville High School Physics. Projectiles  A projectile is an object moving in 2 dimensions under the influence of gravity. For example,
2015 CSE/EGR Summer Camps 1 Computer Science Concepts 1. What is an algorithm? 2. Binary information coding 3. Programming concepts via Scratch Designed.
An Introduction to Designing and Executing Workflows with Taverna Aleksandra Pawlik materials by: Katy Wolstencroft University of Manchester.
Unit 3-1: 2-Dimensional Vectors. A vector is any quantity that has both magnitude and direction. A 2-Dimensional vector is drawn at some angle with the.
Integers Lesson 1a: Integers Integers are whole numbers and their opposites. Negative integers are numbers less than zero. Positive integers are numbers.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
Learning Unity. Getting Unity
1 Computer Graphics Week9 -3D Geometric Transformation.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
TRANSLATIONS. THE BASICS Vocabulary and concepts.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
MOTION IN TWO DIMENSIONS VECTOR ALGEBRA PROJECTILE MOTION RELATIVE MOTION P P P.
Teacher/Mentor Institute Using easyC David Dominguez June 2, 2015 Update Version.
Red Table – Station 1 Read instructions carefully and then complete the activity.
Morphing Project II. What is morphing?  Changing one object to another through seamless transition.
Engineering 1182 College of Engineering Engineering Education Innovation Center Constraint Based Modeling Geometric Constraints Rev: , AJPGeometric.
Kinematics = the study of Motion Kinematics = the study of Motion.
Splash Screen.
Spanish Mad libs with Scratch
2D Viewing Pipeline.
Physics Section 3.1 Represent quantities using vectors
4.5: Graphing Equations of Lines
Introduction to Object-Oriented Programming
Graphing & Describing “Translations”
PowerPoint PowerPoint is used for creating slideshows that accompany speeches, lectures, or other types of presentations. Slides can include text, images,
Physics Support Materials Higher Mechanics and Properties of Matter
9.2 Representing Linear Functions
Projectile Motion Objective: I will distinguish between the horizontal and vertical components of projectile motion and analyze the factors that influence.
Section 3.1 Graphs of Linear Equations.
An Introduction to Designing and Executing Workflows with Taverna
SIMSCRIPT SIMSCRIPT is a general-purpose simulation language
Presentation transcript:

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-1 Day 5 Section 9 - Contiuous Simulation –Exercise 9 Section 10 - Animation –Demonstration of SIMANIMATION –Exercise 10 

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-2 Section 10 - Animation Part 1 - Demonstration of SIMANIMATION

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-3 SimAnimation's Concept - Toward Object Oriented Programming Define an object with a process routine - say an airplane Give it some characteristics - location, velocity Attach routines for specific procedures - move to new location Invoke routine by waiting

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-4 Use Processes to Control Motion Initial velocity, location Wait some time to let object move Change something, say velocity Wait some more time for object to move again Dynamic graphic process is a temporary entity with motion attributes added (i.e. Dynamic Graphic Entity)

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-5 Some Definitions Universe World View Viewing Transformation Viewport A viewing transformation connects the World View to the Viewport Everything else is clipped

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-6 Some Definitions (continued) The universe is the space you're working in (miles) A world view is that part of the universe you want to see on the screen at any given time -100 miles to +100 miles horizontally 25 miles to 75 miles vertically A view port is that part of the screen containing the world view 0 to 20,000 NDC units horizontally 0 to 5,000 NDC units vertically

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— 10-7 Viewing Transformation Let vxform.v = 2 Call setworld.r (-100,100,25,75) Call setview.r (0,20000,0,5000)

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Preamble 2 3 '' This shows a simple dynamic graphics output using SimAnimation. 4 '' It draws a shape and moves it around the screen. 5 '' CACI Products Company 6 7 Normally mode is undefined 8 9 Processes include 10 SHAPE Dynamic graphic entities include 13 SHAPE Define minutes to mean units Define..END.OF.PROGRAM to mean Call messagebox.r ("Click to end program!","End of Program") End ''Preamble 1 Main 2 3 Call SET.GRAPHICS 4 Activate a SHAPE now 5 Show SHAPE with "ARROW" 6 7 Start simulation 8 9 End ''Main

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Process SHAPE 2 3 Define.I as an integer variable 4 5 Let location.a(SHAPE) = location.f(0.0, 0.0) 6 7 Let velocity.a(SHAPE) = velocity.f(200.0, pi.c/4) 8 Let orientation.a(SHAPE) = pi.c/4 9 Wait 16 minutes Let velocity.a(SHAPE) = velocity.f(200.0, - pi.c / 2) 12 Let orientation.a(SHAPE) = - pi.c /2 13 Wait 11.6 minutes Let velocity.a(SHAPE) = velocity.f(200.0, 0.8 * pi.c) 16 For.I = 1 to 100 do 17 Add (pi.c / 10) to orientation.a(SHAPE) 18 Wait 0.1 minutes 19 Loop ''I = 1 to 100 do Let velocity.a(SHAPE) = END.OF.PROGRAM End ''SHAPE

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Routine SET.GRAPHICS 2 3 '' Set maximum speed to 1 second of real time per unit of simulated time 4 5 Let timescale.v = '' Open a viewport 8 9 Let vxform.v = 5 10 Call setworld.r(0, 3277, 0, 2276) 11 Call setview.r (0, 32767, 0, 32755) End ''SET.GRAPHICS

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Exercise 10 Approach to Runway C:\Program Files\Simscript3\models\Heathrow

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Heathrow Airport Reprise As a final exercise in simulation and modeling, write a SIMSCRIPT II.5 program to animate the flight of an airplane on its approach to Heathrow airport. The checkpoints through which the airplane must pass are listed below. HEATHROW APPROACH CHECKPOINTS X Y (initial location)

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Preamble '' Heathrow Airpot Animation Problem - CACI Products Company '' Preliminary Code for Student Problem '' The user must create an icon representing an airplane and '' write a process to make the airplane move. '' files: HEATHROW.SRC, graphics.sg2 with lhw.icn & (user).icn Normally mode is undefined Temporary entities include MAP Graphic entities include MAP Define..DISPLAY.VIEW.PORT to mean 2 Define minute to mean units Define minutes to mean units End ''Preamble Main Create a MAP Display MAP with "LHW.ICN" End ''Main

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Routine VECTOR Given.X1, ''Coordinates of first point.Y1,.X2, ''Coordinates of second point.Y2,.SPEED ''Speed of object Yielding.TIME, ''Time to go from first to second point.DIRECTION ''Direction from first to second point (radians) Define.X1,.Y1,.X2,.Y2,.SPEED,.TIME,.DIRECTION,.DELTA.X and.DELTA.Y as real variables Let.DELTA.X =.X2 -.X1 Let.DELTA.Y =.Y2 -.Y1 Let.TIME = sqrt.f(.DELTA.X ** 2 +.DELTA.Y ** 2) /.SPEED Let.DIRECTION = arctan.f(.DELTA.Y,.DELTA.X) End ''VECTOR

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— Routine SET.GRAPHICS Let timescale.v = 100 '' Set up a display view port Let vxform.v =..DISPLAY.VIEW.PORT Call setworld.r (-11, 11, -11, 11) Call setview.r (1000, 32000, 1000, 32000) End ''SET.GRAPHICS

—————————— CACI Products Company —————————————————————————————— SimScript II.5 —————————————— This page is intentionally blank