Vector2D

Nicholas Zambetti

October 2003

Exposition  »  Projects  »  Vector2D

Vector2D is an open-source Macromedia Flash Actionscript class for performing vector operations in two dimensions. Since calculations related to physics often involve vectors, this class should ease the development of simple physical behaviors and run-time simulations. As a result of the similarity between Actionscript 1.0 and ECMAScript, the Actionscript 1.0 version of

Vector2D can be trivially ported to other ECMA-262 compliant languages. An Actionscript 2.0 version is also provided. Some demonstrations and usage examples can be found on this page as well. For a thorough explanation of vectors and their use in physics, there is a very nicely written free physics book available for download.

Examples & Demonstrations

Flash plug-in required
Collision Detection 
n-way collision detection and response system
Drag / Friction 
simulation gravitational and frictional forces
Field Forces (source)
example of how to apply forces to multiple objects
Competing Forces (source)
example of how to compute resultant force
   
 

Downloads

Vector2D for Actionscript 1
Vector2D for Actionscript 2

Legal Notice

The Vector2D class is provided without any restrictions on use. Please report bugs though

Contact

Via Montenavale 1
Ivrea (TO), Italia 10015
email me :)
© 2006 Nicholas Zambetti