< Day Day Up > |
Chapter 2, "Geometry Snippets"Pythagorean TheoremIn a right triangle, the square of the length c of the hypotenuse is equal to the sum of the squares of the lengths a and b of the other two sides: c2 = a2 + b2. Distance Formula in 2Dwhere P1(x1,y1) and P2(x2,y2) are points on the line. Distance Formula in 3Dwhere P1(x1,y1,z1) and P2(x2,y2,z2) are points on the line. Midpoint Formula in 2Dis the midpoint between P1(x1,y1) and P2(x2,y2). Midpoint Formula in 3Dis the midpoint between P1(x1,y1,z1) and P2(x2,y2,z2). Parabola with a Vertical Axisy = a(x – h)2 + k, with vertex (h,k) and axis of symmetry x = h. Parabola with a Horizontal Axisx = a(y – k)2 + h, with vertex (h,k) and axis of symmetry y = k. Equation of a Circle(x – h)2 + (y – k)2 = r2 where the center is (h,k) and the radius is r. Equation of a Circle Centered at the Originx2 + y2 = r2 where the center is (0,0) and the radius is r. Equation of a Sphere(x – h)2 + (y – k)2 + (z – l)2 = r2 where the center is (h,k,l) and the radius is r. Equation of a Sphere Centered at the Originx2 + y2 + z2 = r2 where the center is (0,0,0) and the radius is r. Circle-Circle Collision DetectionGiven two circles and , if , a collision occurs. Optimized Circle-Circle Collision DetectionGiven two circles and , if (h2 – h1)2 + (k2 – k1)2 (r1 + r2)2, a collision occurs. Optimized Sphere-Sphere Collision DetectionGiven two spheres and , if (h2 – h1)2 + (k2 – k1)2 + (l2 – i1)2 (r1 + r2)2, a collision occurs. |
< Day Day Up > |