Article Preview
Buy Now
| Print: | |
| PDF: |
Feature
Ballistic Sprites
Welcome to the world of projectile motion
Issue: 4.2 (November/December 2005)
Author: JC Cruz
Article Description: No description available.
Article Length (in bytes): 15,925
Starting Page Number: 17
RBD Number: 4210
Resource File(s):
4210.sit Updated: Thursday, November 17, 2005 at 12:40 PM
4210.zip Updated: Thursday, November 17, 2005 at 12:40 PM
Related Link(s): None
Known Limitations: None
Excerpt of article text...
In my previous article, I demonstrated how to use the Euler Method to simulate an object in free-fall. This is a simple model where the object moves only in the vertical direction. Today, I shall demonstrate how to simulate an object moving in both vertical and horizontal directions.
Welcome to the world of projectile motion (also known as ballistics).
The Concept of Ballistics
Basic Vectors
First, allow me to introduce the mathematical concept known as a vector.
What is a vector? A vector is a representation of any quantity that has a magnitude and a direction in multi-dimensional space. One example of a vector is the velocity of a moving object. The object moves at a certain speed (magnitude) and at an angle (direction) with respect to the reference. The counterpart of a vector is the scalar. Whereas a vector has both a magnitude and a direction, a scalar only has a magnitude. One example of a scalar is the mass of an object.
Figure 1 shows a typical vector, together with its mathematical representation, in two-dimensional or (X,Y) space. Additional dimensions would result in additional components. For Figure 1, I can calculate the (X,Y) component of the vector by using the following equations.
...End of Excerpt. Please purchase the magazine to read the full article.
Article copyrighted by REALbasic Developer magazine. All rights reserved.
|







