The Essential Guide to Physics for
Flash Games, Animation, and
Simulations
Copyright 2011 by Dev Ramtal and Adrian Dobre
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-3674-0
ISBN-13 (electronic): 978-1-4302-3675-7
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logos, or image we use the names, logos, or images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
The use in this publication of trade names, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
Distributed to the book trade worldwide by Springer Science+Business Media LLC., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail .
For information on translations, please e-mail .
Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk SaleseBook Licensing web page at www.apress.com/bulk-sales
.
The information in this book is distributed on an as is basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work.
The source code for this book is freely available to readers at www.apress.com
in the Downloads section.
Credits
President and Publisher: | Coordinating Editor: |
Paul Manning | Corbin Collins
|
Lead Editor: | Copy Editor: |
Chris Nelson | Nancy Sixsmith
|
Technical Reviewer: | Compositor: |
RJ Owen | Apress Production (Christine Ricketts)
|
Editorial Board: | Indexer: |
Steve Anglin, Mark Beckner, | SPI Global |
Ewan Buckingham, Gary Cornell, |
Jonathan Gennick, Jonathan Hassell, Michelle Lowman, James Markham, | Artist: SPI Global |
Matthew Moodie, Jeff Olson, Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic Shakeshaft, | Cover Artist: Anna Ishchenko |
Matt Wade, Tom Welsh | Cover Designer: Corn van Dooren |
To my mother, who made me possible; and to my wife and daughter, who supported me in making this book possible.
DR
To my family who have been so understanding while I have been away from them working on this book.
AD
Contents at a Glance
Contents
About the Authors
Dev Ramtal has been coding physics for more than 20 years. Alongside his academic research background in mathematical and computational physics, he has a long history of web development experience since building his first website back in 1997. Dev has been working with the Flash platform for the past six years, using it as a research and teaching tool, for general web programming, and just for some serious fun. He is also increasingly interested in game programming. Dev has a BSc and a PhD in Physics from the University of London. He lives in the UK where he works as a research scientist in academia. He can be contacted at www.physicscodes.com
.
Adrian Dobre has more than 15 years of experimental and computational modeling experience in fluid dynamics. His experience in scientific research and teaching brought his attention to ActionScript and Flash, where programming combines with nice visual output. From here his dedication over more than five years for using Actionscript as a tool to model physical processes and create virtual laboratory platforms. Adrian holds a BSc in Aeronautical Engineering from University Politehnica in Bucharest, Romania and a PhD in Engineering Science from the University of Western Ontario, Canada. He currently lives in Bucharest, Romania, with his family.
About the Technical Reviewer
RJ Owen is a senior software architect at Effective UI. RJ has been working with Flex since version 2 and has worked on many projects of varying sizes and complexities, but always favors those with great user interfaces. He is a regular blogger and has spoken at many events including 360|Flex, Adobe MAX, and O'Reilly's Web 2.0. RJ enjoys advocating for teaching developers how to design and branch into skills beyond software. He has an MBA degree in Physics and Computer Science and lives in Colorado with his family.
About the Cover Image Artist
Corn van Dooren designed the front cover image for this book. After taking a brief hiatus from friends of ED to create a new design for the Foundation series, he worked at combining technological and organic forms, the results of which now appear on this and other book covers.
Corn spent his childhood drawing on everything at hand and then began exploring the infinite world of multimediaand his journey of discovery hasn't stopped since. His mantra has always been, The only limit to multimedia is the imaginationa saying that keeps him constantly moving forward.
Corn works for many international clients, writes features for multimedia magazines, reviews and tests software, authors multimedia studies, and works on many other friends of ED books. You can see more of his work at and contact him through his website at www.cornevandooren.com
.
Acknowledgments
We are extremely grateful to all the individuals, at Apress and elsewhere, who have helped turn this book from an idea into physical reality. An enormous amount of work goes into producing a book, of which writing it is only one part. We were fortunate to have the support of such a fantastic teamwe won't mention any names for fear of missing anyone.
We are also grateful to the Flash and programming community for sharing their knowledge and expertise so openly through blogs, forums, websites, and books. It is a great pleasure to be able to give something back after having gained so much from the community.
Finally, we would like to thank our respective families for their constant support and patience during the intense period of writing this book.