Rice COMP 360 - Baseball Classical Mechanics and Computer Graphics

Unformatted text preview:

Baseball, Classical Mechanics, and Computer GraphicsRon GoldmanDepartment of Computer ScienceRice UniversityOutlinePart I: Baseball Arithmetic Part II: Archimedes’ Law: Baseball Arithmetic in Classical Mechanicsand Classical Mechanics in Computer GraphicsPart III: Pseudoperspective: Baseball Arithmetic in Computer GraphicsPart IV: Baseball Folklore (If Time Permits)Part I Baseball ArithmeticThemesBaseballWhoever wants to know the heart and mind of America had better learn Baseball.Jacques BarzunNext to religion, Baseball has furnished a greater impact on American life than any other institution. Herbert HooverArithmeticThere still remain three studies suitable for a free man. Arithmetic is one of them.Plato -- The LawsIt is proper … to persuade those who are to share in the highest things in the city to go for and tackle the art of calculation, and not as amateurs. Plato -- The RepublicBatting AverageFormula • Batting Average = Total HitsTotal at BatsRepresentation• Overloaded Notation• Lazy Evaluation.400 HittersImmortals (1901– 1930)Harry Heilmann (.403) Ty Cobb (.401, .409, .420)Shoeless Joe Jackson (.408) Rogers Hornsby (.401, .403, .424)Nap Lajoie (.426) George Sisler (.407, .420)Bill Terry (.401)Ted Williams (1941)179448= .39955 ≈ .400 -- next to last day of season68= .750 -- last day of season179448⊕68=185456≈ .406FractionsAre there not two kinds of arithmetic, that of the people and that of philosophers? (Socrates -- Philebus)Standard Arithmetic Baseball Arithmetic1. Addition 1. Additionab+cd=ad+ bcbd bd ≠ 0ab⊕cd=a + cb + d2. Scalar Multiplication 2. Scalar Multiplication n∗ab=ab+ L+abn terms1 2 4 3 4 =nab b ≠ 0 n ⊗ab=ab⊕L ⊕abn terms1 2 4 3 4 =nanb3. Identity for Addition 3. Identity for Addition0100Ordered PairsStandard Arithmetic Baseball Arithmetic1. Addition 1. Addition(a, b) + (c, d) = (ad + bc, bd) bd ≠ 0(a, b) ⊕ (c,d) = (a + c, b + d)2. Scalar Multiplication 2. Scalar Multiplicationn∗(a,b) = (na, b) b ≠ 0n ⊗ (a, b) = (na,nb)3. Identity for Addition 3. Identity for Addition(0,1)(0, 0)In Both Sets of Rules:i. Addition is Associative and Commutative.ii. Multiplication Distributes Through Addition.Baseball ArithmeticEquivalence Is Not Identity Addition Is Weighted Averaging 13≡100300≡ .333K210⊕410=620≡31013⊕01=14≡ .25013⊕13=26≡13100300⊕01=100301≈ .33212⊕710=812≡23The Laws of AveragesWhen I’m not hitting, I don’t hit nobody. But when I’m hitting, I hit anybody. (Willie Mays)1. Additionab⊕cd=a + cb + d2. Scalar Multiplicationn ⊗ab=nanb3. Affect of Streaks and Slumpsab≤cd ⇒ ab≤ab⊕cd≤cd4. Official Scorer’s Correction Ruleab⊕h0=a + hbPart II: Archimedes’ LawBaseball Arithmetic in Classical Mechanicsand Classical Mechanics in Computer GraphicsMass PointsNotationP = point in affine spacem = massmP = mass × point(mP, m) = mass pointmPm= mass pointOverloaded Notation• Quotient = Position• Denominator = Mass• Numerator = Mass×PointThe Laws of the LeverIt’s like deja vu all over again. (Yogi Berra)1. Archimedes’ Lawm1P1m1⊕m2P2m2=m1P1+ m2P2m1+ m2(Center of Mass)2. Altering Mass Does Not Affect Positionc ⊗mPm=cmPcm3. Fulcrum Lies Between the Masses m1P1m1pm1P1m1⊕m2P2m2pm2P2m24. Mass Has InertiamPm⊕F0=mP + FmThe Laws of Averages1. Additionab⊕cd=a + cb + d2. Scalar Multiplicationn ⊗ab=nanb3. Affect of Streaks and Slumpsab≤cd ⇒ ab≤ab⊕cd≤cd4. Official Scorer’s Correction Ruleab⊕h0=a + hbThe Laws of the Lever -- Revisited1. Archimedes’ Lawm1P1,m1( )⊕ m2P2,m2( )= m1P1+ m2P2, m1+ m2( )2. Altering Mass Does Not Affect Positionc ⊗ mP, m( )= cmP,cm( )3. Fulcrum Lies Between the Masses m1P1,m1( )p m1P1+ m2P2,m1+ m2( )p m2P2, m2( )4. Mass Has InertiamP,m( )⊕ F,0( )= mP + F,m( )Perspective••E (eye)P (point)P* (perspective projection) ••Q (screen point) N (unit normal)DepthS (screen)P* ={(Q − E)• N}P +{(P − Q)• N}E(P − E)• NDepth•••θ| P − Q |Depth(P)NQ (point on plane)affine planeP (point)θ(unit normal)Depth(P) =| P − Q | cosθ= (P − Q)• NPerspective and the Law of the LeverΔmEE,mE( )mPP, mP( )dEdPaPaEplane of mass − points•QN (unit normal)•••θθΔ = center of mass ⇒ mpdp= mEdEaP/ dP= sinθ= aE/ dE ⇒mPaP/ mPdP= mEaE/ mEdE∴mPdP= mEdE⇔ mPaP= mEaETo find the intersection Δ of the plane S with the line EP, letmP= aE= (Q − E) • N and mE= aP= (P − Q) • N and compute center of mass.∴Δ =mPP + mEEmP+ mE={(Q − E) • N}P +{(P − Q) • N}E(P − E) • NPart III: PseudoperspectiveBaseball Arithmetic in Computer GraphicsPseudoperspectiveMappingviewing frustumfar planenear planenear planefar planerectangular boxpseudoperspective Goalsi. Clipping Algorithms -- Map the viewing frustum into a rectangular box.ii. Projections -- Replace perspective projection by orthogonal projection.iii. Hidden Surface Algorithms -- Preserve relative depth.PseudoperspectiveProjective Geometry• Every projective transformation is defined by the image of 5 generic points.• Solve 15 homogeneous linear equations in 16 unknowns.Grassmann Geometry•Pseudoperspective = Perspective Projection ⊕ Depth Vector••E (eye)P (point)P* (perspective projection) ••Q (screen point) N (unit normal)DepthS (screen)FormulasPerspective ProjectionP* ={(Q − E)• N}P +{(P − Q)• N}E(P − E)• NDepth (Projection on Normal Vector)Depth(P) = (P − Q) • NPerspective + Depth VectorP* * = P * +{Depth(P)}N ={(Q − E) • N}P +{(P − Q) • N}E(P − E) • N + {(P −Q) • N}N={(Q − E)• N}P +{(P − Q)• N}E + {(P − Q)• N}{(P − E)• N}N(P − E) • NProblem{(P − Q) • N}{(P − E) • N}N -- not linear in PNon-Linearity{(P − Q) • N}{(P − E) • N}NProjection into xy-planeEye on z-axisQ = (0,0, 0)N = (0, 0, −1)E = (0, 0,1)P = (x, y,z)(P − Q)• N = (x, y, z) •(0, 0, −1) = −z(P − E)• N = ( x, y, z − 1) • (0, 0, −1) = −(z − 1){(P − Q) • N}{(P − E) • N}N = z(z −1)(0, 0, −1)Formulas RevisitedPerspective ProjectionP* ={(Q − E)• N}P +{(P − Q)• N}E(P − E)• NDepth (Projection on Normal Vector)Depth(P) = (P − Q) • NPerspective ⊕ Depth VectorP* * = P * ⊕{Depth(P)}N ={(Q − E) • N}P +{(P − Q) • N}E(P − E) • N ⊕ {(P − Q) • N}N0 ={(Q − E) • N}P +{(P − Q) • N}E +{(P − Q)• N}N(P − E)• NNo Problem{(P − Q) • N}N --


View Full Document

Rice COMP 360 - Baseball Classical Mechanics and Computer Graphics

Documents in this Course
Radiosity

Radiosity

42 pages

Radiosity

Radiosity

22 pages

Load more
Download Baseball Classical Mechanics and Computer Graphics
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Baseball Classical Mechanics and Computer Graphics and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Baseball Classical Mechanics and Computer Graphics 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?