Professional Documents
Culture Documents
May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
applicable copyright law.
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
applicable copyright law.
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
SECOND EDITION
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Physics for Game Developers, Second Edition
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc. Physics for Game Developers, 2nd Edition, the image of a cat and mouse, and related trade dress
are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
applicable copyright law.
ISBN: 978-1-449-39251-2
[LSI]
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Part I. Fundamentals
1. Basic Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Newton’s Laws of Motion 3
Units and Measures 4
Coordinate System 6
Vectors 7
Derivatives and Integrals 8
Mass, Center of Mass, and Moment of Inertia 9
Newton’s Second Law of Motion 20
Inertia Tensor 24
Relativistic Time 29
2. Kinematics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Velocity and Acceleration 36
Constant Acceleration 39
Nonconstant Acceleration 41
2D Particle Kinematics 42
3D Particle Kinematics 45
X Components 46
Y Components 47
Z Components 48
The Vectors 48
applicable copyright law.
iii
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Angular Velocity and Acceleration 62
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
3. Force. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Forces 71
Force Fields 72
Friction 73
Fluid Dynamic Drag 75
Pressure 76
Buoyancy 77
Springs and Dampers 79
Force and Torque 80
Summary 83
4. Kinetics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Particle Kinetics in 2D 87
Particle Kinetics in 3D 91
X Components 94
Y Components 95
Z Components 95
Cannon Revised 95
Rigid-Body Kinetics 99
5. Collisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Impulse-Momentum Principle 104
Impact 105
Linear and Angular Impulse 112
Friction 115
6. Projectiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Simple Trajectories 120
Drag 124
Magnus Effect 132
Variable Mass 138
iv | Table of Contents
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Summary 159
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
8. Particles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Simple Particle Model 166
Integrator 169
Rendering 170
The Basic Simulator 170
Implementing External Forces 172
Implementing Collisions 175
Particle-to-Ground Collisions 175
Particle-to-Obstacle Collisions 181
Tuning 186
Table of Contents | v
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Rotational Restraint 275
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
Power 340
Stopping Distance 341
Steering 342
vi | Table of Contents
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Hovercraft 345
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349
Difference from Mouse-Based Input 412
Copyright © 2013. O'Reilly Media. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 3/11/2021 5:38 AM via INDEPENDENT INSTITUTE OF EDUCATION
AN: 565704 ; Bourg, David M., Bywalec, Bryan.; Physics for Game Developers : Science, Math, and Code for Realistic Effects
Account: s6311349