Animation Maths

Page 1


Chapter1 · ArithmeticRefresher

Asthischapteroffersallnecessarymathematicalskillsforafullmasteringofallfurther topicsexplainedinthisbook,westronglyrecommendit.Toserveitspurpose,thesuccessiveparagraphsbelowrefreshsomerequiredaspectsofmathematicallanguageasused ontheappliedlevel.

1.1Algebra

RealNumbers

Wetypesetthesetof:

naturalnumbers(unsignedintegers)as N includingzero, integernumbersas Z includingzero, rationalnumbersas Q includingzero, realnumbers(floats)as R includingzero.

Alltheabovemakeachainofsubsets: N ⊂ Z ⊂ Q ⊂ R

Toavoidpossibleconfusion,weoutlineabriefglossaryofmathematicalterms.Werecall thatusingthecorrectmathematicaltermsreflectsacorrectmathematicalthinking.Putting downideasinthecorrectwordsisofmajorimportanceforaprofoundinsight.

Sets

Werecallwritingall subsets inbetweenbraces,e.g.the emptyset appearsas{}.

Wedefinea singleton asanysubsetcontainingonlyoneelement,e.g. {5}⊂ N,as asubsetofnaturalnumbers.

Wedefinea pair asanysubsetcontainingjusttwoelements,e.g. {115, 4}⊂ Z, asasubsetofintegers.Inprogrammingthebooleanvalues true and false makeup apair {true, false} calledthebooleansetwhichwetypesetas B.

Wedefine Z = {..., 3, 2, 1} wheneverweneednegativeintegersonly.We expresssymbolicallythat 1234isan element of Z bytypesetting 1234 ∈ Z

Wetypesetthe setminus operatortodeleteelementsfromasetbyusingabackslash,e.g. N \{0} readingallnaturalnumbersexceptzero, Q \ Z meaningallpure rationalnumbersafterallintegervaluesleftoutand R \{0, 1} expressingallreal numbersapartfromzeroandone.

Chapter4 · Functions

Howdoesanapplicationdeterminewhetherobjectsarecolliding,howcharactersmove orwhichtrajectorytheytake?Itcanallbeachievedbytheuseoffunctions.Inthis chapterweoutlinesomebasicconceptsonfunctionsandwediscusstheimportantlinear andquadraticfunctions.Wetheninitiatecollisiondetectionviaintersectingfunctions. Finallywepresentthetrigonometricfunctionswhichareofkeyimportancetodescribe periodicalphenomenons.

4.1Basicconceptsonrealfunctions

Wedefinea function asamapping f thatforeachargument x returnsatmostone image f (x).

Wedefinethe domain ofafunctionasthesetofarguments x whichhaveexactly oneimage f (x).

Wedefinethe range ofafunctionasthesetofallimages f (x) returnedbythe function f .

Wedefinea root ofafunction f aseachargument x0 thatmapsto f (x0 )= 0.

Allfouroftheabovedefinitionscanbesummarizedinanexplicitformulaorrecipe f : domain → range : x → y = f (x).Therealfunction f : R → R : x → y = f (x) maps arguments x ofthedomainin R ontoimages f (x) oftherangein R.Thereforewecan easilyvisualizethefunctioninan R R graph.

range

Figure4.1:Thegraphofafunction f (x)

domain

4.6Exercises

Exercise32 Provethatperpendicularlines’sslopesmultiplytominusone.

Hint:baseyourreasoningonthetangentoftheirinclinationangles.

Exercise33 Theequationofaparabolaiswrittenas y = ax2 + bx + c.Determinethesign ofeachcoefficient a, b and c foreachparabolatypeshownbelow.

Exercise34 Duringacomputergameanobjectisrunningonastraightlinefromthe point A withcoordinates (0, 20) tothepoint B pinnedby (15, 30).Findtheequationof thisstraightline AB.Whentheobjectiscrossingthepoint (30, 40),thegamersendsit 90◦ totheleftonanotherstraightline.Findtheequationofthisnewstraightline.Draw bothlines,theformerline AB andthelatternewone,inone (x, y)-frame.

Exercise35 Acarisdrivingonastraightline3x + 5y = 8.Onanotherstraightline x + 3y = 4abrickwallisbuilt.Ifthecarkeepsdrivingonitsstraightline,williteverhit thiswall?Incaseitdoes,inwhatpointexactly?Drawbothlinesinone (x, y)-frame.

Exercise36 Findtheintersectionpointsofthefunctions f (t )= 12t 24and g(t )= 3t 2 + 3t 36.

Exercise37 Amilitaryairplanedescendsaccordingtothestraightline h1 (t )= 2t + 100, with h referringtothealtitudeinhectometer.Therunningargument t isthetimebeing expressedinminutes.Adefencerocketorbitingontheparabola h2 (t )= t 2 + 3t + 106 willdestroytheplane.Determinethemomentandthealtitudefortherockettostrikethe plane.

Exercise38 Retrievetherecipesofbothfunctionsgraphedbelow.

Chapter9 · Kinematics

Kinematics-asthestudyofmotion-providesuswiththebasic equations whichgovern allmotion.Inthiswaywemathematically describehow objectsmove.Ofcoursethisis criticallyimportanttogameprogrammingasnearlyeveryactiongameinvolvesobjects flying,driving,sailingormovinginanyotherway.Applyingevenbasickinematicswill giveourgamesatouchofrealism.Inthischapterwediscussdeltatimeviaframerate,to baseaswellthetranslationalascircularmotiononit,andtoeventuallyoutlinethepopular projectilemotion.

9.1Measures

A measure isaqualityoraspectfromrealitythatrecordsadirectlyobservableorcomputablevalue.

Precision

Wedefinenumerical precision asthenumberofcorrect significantdigits ofarealvalue. Inphysicsprecisionindicateshowaccuratewecapturenatureindigits.Throughoutthis chapterweapplyvariousnumericalprecisionsappropriatetothesituation.As trailing zeros matterinphysics,theyreflecttheaccuracyofameasurement.Forinstancealength l ofonemeteroughttobetypesetas1 00 m whenmeasureduptocentimeters.

Units

Inourmodernworldwequantifymeasuresstandardizedbythe SI (theInternationalSystemofUnits)forwhichwerefertoAnnexC(seepage324).Nature’sfundamentalquantitieslength l ,mass m andtime t aremeasuredinmeters m,kilograms kg andseconds s respectively.Eachofthesefundamental units isphysicallybasedonanoperationaldefinition,forwhichwerefertotheexpertliterature.Wemaytypesetunitsbyputting square brackets aroundtheircorrespondingmeasures.

measure symbol SI-unit

length l [l ]= m meter

mass m [m]= kg kilogram

time t [t ]= s second

Index

abscissa,100 absolutevalue,101 acceleration,158 accelerationduetogravity,161 acuteangle,48 algebraicrepresentation,271 algebraicstructure,120,218 aliasing,304 altitude,48 amplitude,74 anchorpoint,141,148 angle,46 anglebisector,48 angularacceleration,173 angularcomponent,181 angulardisplacement,166 angularfrequency,74 angularlocation,166 angularspeed,74,166 angulartime-independentformula,176 angularvelocity,172 anticommutative,131 antidiagonal,215 antiparallel,116,133 apex,187 arccosine,61 arcsine,61 arctangent,61 Areaoftriangles,55 argument,272 array,113,117,119,214

B-spline,310 base,20,48 basevector,116

baselinecrossings,76 basictransformation,244 bestfitcircle,179 Beziercurve,302 Binet’sformula,234 binomial,27 blockmatrix,227 cartesian,100 cartesianequation,143 center,194 centerofcurvature,179 centripetalacceleration,169,172,182 characteristiccoefficientmatrix,307,309, 311 circle,194 coefficient,28 coefficientmatrix,231 cofactor,216 collinear,201,298,299 column,220,222 columnmatrix,214 columnvector,214 commutativeproperty,117 complementaryangles,58 complexconjugate,273 complexnumber,271 components,115,121 composedoperatormatrix,256 composedtransformation,254 conjugatequaternion,287 contradiction,23 controlpoint,297,298,310 convergence,94 coplanar,299

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.