Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 14 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

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):

Download Icon 4210.sit Updated: Thursday, November 17, 2005 at 12:40 PM
Download Icon 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.


 


|

 


Weblog Commenting and Trackback by HaloScan.com