Chapter 2 Motion. Now consider a horizontal pipe running through it (left to right). Now, a vertical pipe (top to bottom) runs through the same point.

Similar documents
An object in 3D space

When you move an (unparented and unrotated) item in Layout, generally your mouse movements have the following effects:

Motion Creating Animation with Behaviors

Autodesk Navisworks Freedom Quick Reference Guide

The Alice Scene Editor

Visual Physics Camera Parallax Lab 1

Autodesk Moldflow Insight AMI User Interface

3.6: First Person Computer Games

This document describes the user interface, navigation and the common resources that are available in SvalSim

Maya Lesson 3 Temple Base & Columns

Computer Graphics 1. Chapter 9 (July 1st, 2010, 2-4pm): Interaction in 3D. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Working with the Dope Sheet Editor to speed up animation and reverse time.

Beaumont Middle School Design Project April May 2014 Carl Lee and Craig Schroeder

SolidWorks 2½D Parts

SolidWorks Intro Part 1b

This lesson introduces Blender, covering the tools and concepts necessary to set up a minimal scene in virtual 3D space.

THE FOURTH DIMENSION (AND MORE!)

Two-Dimensional Projectile Motion

3D Space is one of the most rewarding areas

Zero Launch Angle. since θ=0, then v oy =0 and v ox = v o. The time required to reach the water. independent of v o!!

Alice: A Free 3D Animation World for Teaching Programming

Viewing with Computers (OpenGL)

Chapter 1 Objectives. Today s Agenda. What is a Computer Program? Chapter 1: Introduction to Alice and Objects

Scene Modeling for a Single View

Appendix E: Software

Chapter 2 Parametric Modeling Fundamentals

Falling Balls. Names: Date: About this Laboratory

3D Surface Plots with Groups

Creating the Tilt Game with Blender 2.49b

potions. The troll doubles in size.

Y36MVR Second Life inclined plane

BCC Comet Generator Source XY Source Z Destination XY Destination Z Completion Time

Methods (part 2) Alice In Action, Ch 2

This is the opening view of blender.

Chapter Adding 1- T Mo he tio B n le to nde Yo r ur Inte Scerfac ne e Landscape Scene Stormy Night.mp4 End 200 Default Animation frame 1 Location

Mathematics 308 Geometry. Chapter 9. Drawing three dimensional objects

Selective Space Structures Manual

ENVI Classic Tutorial: 3D SurfaceView and Fly- Through

S3 Scratch Programming

Camera Calibration for Video See-Through Head-Mounted Display. Abstract. 1.0 Introduction. Mike Bajura July 7, 1993

EXERCISE 6: AEC OBJECTS

Lecture 3 Sections 2.2, 4.4. Mon, Aug 31, 2009

Lesson 3. Investigation. Name: a. Use the matrix to find the rotation image of the point (-1, 5).

3 Polygonal Modeling. Getting Started with Maya 103

Select, Move, Rotate and Scale

Ladybird Project - Vacuum Mould

HOUR 12. Adding a Chart

Visual Physics Introductory Lab [Lab 0]

BASIC-Tiger Application Note No. 030 Rev A joystick for the Tiger. Gunther Zielosko. 1. Basics

Adding a Trigger to a Unity Animation Method #2

ARCHITECTURE & GAMES. A is for Architect Simple Mass Modeling FORM & SPACE. Industry Careers Framework. Applied. Getting Started.

AVIONICS FUNDAMENTALS MAINTENANCE TRAINING /27/2006 Chapter 5 - Inertial Reference

Now-Crowd Billboards User Manual

Chapter 9- Animation Basics

Ray Cast Geometry. RayCast Node for Motion, Displacements and Instancing. New to The Ray Cast Geometry node has received an upgrade for 2018.

CS 465 Program 4: Modeller

BoA Tools Page 1 / 31

3D Modeling and Design Glossary - Beginner

COPYRIGHTED MATERIAL. Getting to Know VIZ. Chapter 1

SOLIDWORKS: Lesson 1 - Basics and Modeling. UCF Engineering

A Basic Flight Simulator in Excel #3 calculating the

Parametric Modeling. With. Autodesk Inventor. Randy H. Shih. Oregon Institute of Technology SDC PUBLICATIONS

Ceilbot vision and mapping system

Views of a 3-D Clevis

CECOS University Department of Electrical Engineering. Wave Propagation and Antennas LAB # 1

6.4 Vertex Form of a Quadratic Function

Basic Blender Commands This is just a partial list of Blender commands. Please visit the Blender.org website for more details.

Beginning Paint 3D A Step by Step Tutorial. By Len Nasman

Perspective matrix, OpenGL style

LAB # 2 3D Modeling, Properties Commands & Attributes

Installing and Using Trackside Cameras Revised November 2008

COPYRIGHTED MATERIAL. Getting to Know VIZ. Chapter 1

Sphero Lightning Lab Cheat Sheet

We created a few different effects and animations using this technique as applied to clones.

User manual for animation tools in Norah. User manual for animation tools in Norah

SPACE - A Manifold Exploration Program

Quick Crash Scene Tutorial

Adding Depth to Games

Working with the BCC Z Space I Filter

Lab Assignment #1: Introduction to Creo ME 170

Competency goals 3 and 5; non-routine problem solving Represent problem situations with geometric models.

SOLIDWORKS: Lesson 1 - Basics and Modeling. Introduction to Robotics

An Introduction to Autodesk Inventor 2012 and AutoCAD Randy H. Shih SDC PUBLICATIONS. Schroff Development Corporation

SaVi - satellite constellation visualization INTRODUCTION AND INSTRUCTIONS FOR USE

An Introduction to Autodesk Inventor 2010 and AutoCAD Randy H. Shih SDC PUBLICATIONS. Schroff Development Corporation

Rational Numbers and the Coordinate Plane

4) Click on Load Point Cloud to load the.czp file from Scene. Open Intersection_Demo.czp

An Introduction to Autodesk Inventor 2013 and AutoCAD

BCC 3D Extruded Image Shatter Filter

Google SketchUp. and SketchUp Pro 7. The book you need to succeed! CD-ROM Included! Kelly L. Murdock. Master SketchUp Pro 7 s tools and features

Appendix A Reference: Built-in Methods

PixHawk and Marvelmind Integration Manual. PixHawk/APM Integration with Marvelmind mobile beacon

Projectile Motion SECTION 3. Two-Dimensional Motion. Objectives. Use of components avoids vector multiplication.

INTViewer Tutorial Cube Tutorial

BIOC351: Proteins. PyMOL Laboratory #4. Movie Making

8-4 Transforming Quadratic Functions

Quadratic Functions (Section 2-1)

Chapter 23. Linear Motion Motion of a Bug

3.1 INTRODUCTION TO THE FAMILY OF QUADRATIC FUNCTIONS

Robotics (Kinematics) Winter 1393 Bonab University

Transcription:

Chapter 2 Motion Section 1 Object motion At the end of the previous chapter, you used the mouse to move objects around the screen to position them in desired locations. Some of the exercises were probably somewhat difficult, not from the perspective of understanding what you needed to do, but rather from the perspective of actually doing it. It is not that easy using the mouse (and the 6 radio buttons to select mouse actions) to correctly position all of your objects. In this chapter, you will learn how to issue commands to move objects to their correct locations. Before working with the actual motion commands (and how to issue them), it is necessary to review how the position of an object in 3-D space is described. Describing an object in 3-D space It is first necessary to develop a sense of perspective. To start, consider a single point in space -- well, not really a point, more like a little red ball. Now consider a horizontal pipe running through it (left to right). Now, a vertical pipe (top to bottom) runs through the same point.

And, finally, a depth pipe (front to back) runs through the red ball. That last pipe is a bit difficult to see. So, it is necessary to move the camera up and around just a bit to see it better. In the above graphic, the little red ball is located at the origin. Its position is represented using (x, y, z) coordinates where x is the distance of the object along the horizontal axis, y is the distance along the vertical axis, and z is the distance along the depth axis. The position of the red ball is (0, 0, 0). That is, the red ball object is viewed as the center of attention. And, the central intersection of the x, y, z coordinate system is located at the center of the object. Motion: Rotating On Its Own Axis With the red ball object positioned in this 3-dimensional coordinate system as illustrated above, we can think of the object as being able to rotate in any of three different directions. 2

In each case, one axis is stationary while the other two form a rotating plane. The red ball object turns (spins) in the direction of the rotation. Motion: Along an Axis A different kind of motion occurs if the object moves from its current position along an axis. This is a translation from one location to another. In the figure below, the ball is illustrated as moving along each of the axes. Motion: To a Specific Location Of course, the object can be moved to a location in the three-dimensional space around the origin, (0,0,0), where the axes intersect. For example, you could move the red ball object to a location such as (1, 1, 0). The location (1,1,0) is one unit to the right and one unit up from the center. 3

This is a bit difficult to see with the small red ball. For a bit better perception, the little red ball is exchanged with a 3-dimensional cube, like this: Each point on the surface of the cube is located in 3-dimensional space in terms of its distance from the origin, on each axis. Thus, each point on the surface of the cube is described in terms of (x, y, z) coordinates. You can think of x as left/right, y as up/down, and z as front/back. As presented in the previous chapter, objects can be resized. For example, it is possible to double the size of the cube like this: It is important to be aware of the consequences of resizing. The coordinate points on the surface of the object are changed as the object grows or shrinks. So, a side effect of resizing the object is a movement of the object in three-dimensional space. In 3-dimensional space, motion (translation), rotation, and resizing causes objects to be animated. These three processes together are called graphic transformations. You can perform graphic transformations in Alice by using motion instructions. How objects can move In this section, the focus is on the types of motion an object can perform and how to bring about that motion. The lab corresponding to this section is essential to your understanding of how to move objects around in an Alice scene. One way to move objects around the scene is to use a command line instruction, where a command describing the motion is typed into the command line. The command line s location is as described in Figure 2-1-1 below. 4

This is the command line!!!!! Figure 2-1-1 The location of the command line In the command line you will be able to issue commands that will accomplish the same motion as was previously done using the mouse. Commands can also be issued in a program script. Program scripts will be introduced in chapter 3 of this book. In this chapter, the motion commands are illustrated in terms of what actions can be performed and what options are available for each action. 5

Movement An object has the ability to move around in the virtual world space, using its sense of orientation (up, down, left, right, forward, back). For example, you can command the helicopter to move up 0.25 units, as shown in Figure 2-1-2. (A unit measure is a relative measure that depends on the current camera and object positions.) The command to perform this action is Helicopter.move(up,.25). You can type the command in the Figure 2-1-2 -- Move Instruction command line, or you can take advantage of the pull-down menus in Alice to have the command entered automatically. To perform the move instruction using the pull-down menus, simply position the mouse cursor over the Helicopter icon in the object tree (or over the Helicopter object itself), and then click the right mouse button. Then, move the mouse cursor over the Move instruction in the menu. Another pull-down menu automatically appears. Select the Up option and then, from the next pull-down menu select Other and click the mouse. It should now be possible to specify 0.25, and the helicopter will move in an upward direction by 0.25 units. The move() instruction is used for translational motion (movement from place to place). Rotational movement (pivot) commands include turn() and roll(). Translational and rotational movement were described above. Figure 2-1-3 shows a helicopter performing a turn() motion. In this example, the helicopter turns to its right. You will notice that the turn command performs the same type of motion as the mouse radio button Turns left/right. 6

Figure 2-1-3 -- Rotating an object in a right-left rotational axis Figure 2-1-4 shows the effects of using turn() to tell an object to turn in a backward direction. This is the same type of motion as performed by using the mouse radio button Turns forward/back. Figure 2-1-4 Rotating an object backwards Again, instead of typing the command in the command line, it is possible to use the pulldown menus by right-mouse clicking on the Helicopter, and then selecting Turn, Up (Up is the same as Back), and then Other, specifying 0.1 or 0.2 as the amount to turn. Figure 2-1-5 shows the effects of using roll() to turn an object sideways. There is no mouse motion to exactly simulate this motion. The Tumble radio button does allow this type of motion. Actually, the Tumble radio button allows a full range of rotational motion. 7

Figure 2-1-5 rotating an object sideways Like the previous commands, the Roll motion may also be accomplished by right-mouse clicking on the Helicopter, selecting the Roll option, then selecting either Left or Right, and specifying the amount to roll. Awareness An object is aware of other objects in the world -- though objects are not always smart enough to avoid trying to occupy the same space as another object. For example, suppose a cat and a helicopter object have been added to your world (as in Figure 2-1-6). Figure 2-1-6 -- Before MoveTo Figure 2-1-7 -- After MoveTo You could use an instruction to move the cat to the helicopter. cat.moveto(helicopter) This causes the cat to move to a position immediately adjacent to the helicopter, as illustrated by Figure 2-1-7. It is important to understand that the motion of the cat has been affected by its awareness of the position of the helicopter. Other motion instructions that are affected by awareness include TurnTo(), PointAt(), Place( ), and 8

StandUp( ). Of these instructions, note that only the PointAt() and StandUp() instructions may be accomplished by using pull-down menus. The pull-down menus only list the most frequently used commands. Commands such as TurnTo() and Place( ) that are not in the pull-down menus must be typed into the command line when you wish to use them. Position Placement Unfortunately, positioning objects can be a tricky task. This is especially true when using a mouse motion selected by the radio buttons (e.g., Raises/lowers, Turns forward/back, Tumbles). The position of the object relative to the ground can be visually awkward. That is, the object can become mis-aligned with the ground -- not on the ground. This becomes a problem when the object performs several moves in succession and ends up flying into the air or burrowing into the ground. Let s explain by means of an example. Suppose a chicken is placed in a scene, as in Figure 2-1-8. Figure 2-1-8 Chicken before Move Now, suppose the chicken is moved forward 1.3 units, resulting in the scene in Figure 2-1-9. Figure 2-1-9 Chicken after Move 9

This looks fine. But, let s take a closer look by moving the camera to ground level, as seen in Figure 2-1-10. It is now clear that the chicken is no longer standing on the ground. While chickens can fly, this altitude is a bit unlikely! Figure 2-1-10 Chicken is not really on the ground! The problem is one of placement. Before moving the chicken, we should have made sure that the chicken is standing with its two feet firmly on the ground and that its body is properly aligned with the ground. As an analogy, consider an airplane in flight. If the nose of the plane is pointed down, then moving the plane forward also moves the plane downward. If the nose is pointed upward, then moving plane forward moves the plane upward. The plane must be aligned with the ground to maintain a level forward motion. To make sure the object is placed on the ground properly, two commands should have been issued when placing the chicken in the screen. The commands should be issued in the following order: chicken.standup() chicken.place(ontopof, ground) The first command will ensure the chicken is properly aligned with the ground, and the second will ensure that the chicken is standing exactly on the ground, and is not above the ground or in the ground. Had these two commands been issued first, the result of the move would have been that the chicken remained on the ground, as the ground level camera view in Figure 2-1-11 shows. Figure 2-1-11 Chicken still on ground after Move 10