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

Issue 2.1

FEATURE

Real-Time Mesh Deformation

Issue: 2.1 (August/September 2003)
Author: Joe Strout
Author Bio: Joe works on REALbasic by day, and works in REALbasic by night, mostly building games and 3D utilities. Both Joe and his 3D meshes have been occasionally described as a little warped.
Article Description: No description available.
Article Length (in bytes): 34,596
Starting Page Number: 13
Article Number: 2110
Resource File(s):

Download Icon 2110.zip Updated: 2013-03-11 19:07:57

Related Web Link(s):

http://www.strout.net/info/coding/rb/

Excerpt of article text...

If your 3D graphics needs involve moving rigid, pre-determined models around in space, REALbasic's got you covered. That's easy. But what if your models need to change shape in ways that aren't defined until run-time? This might be the case, for example, if you're animating a mathematical function entered by the user. Or, as in the example we'll be using here, you're simulating a flag flapping chaotically in the wind. What then? Are you forced to abandon REALbasic or use an entirely different approach to 3D?

As usual, the answer is "No." REALbasic's design philosophy is to build the common functionality right into the product, but to provide all the hooks advanced users need to do advanced things. Deforming a mesh falls into the category of advanced things, but as you'll see here, you can do this in REALbasic while still working with standard RB classes and controls.

Raising the Flag

This article started out as a piece about physics simulation. Based on Chapter 17 of Physics for Game Developers (see the review in RBD issue 1.4), I was going to cover the basics of spring-and-particle systems and show how they can be used to simulate cloth deforming due to wind and gravity.

Then I realized the author of that book (David Bourg) already does a good job of explaining those things. If you've got a serious interest in such things, you probably either have this book on your shelf or will be getting it soon. The physics is interesting, but rather independent of what language you happen to use to represent it.

...End of Excerpt. Please purchase the magazine to read the full article.