Math Quiz: Math for - OOP: The simple paint project

  1. A plotting machine starts its drawing pen at coordinate P1 = (10, 20). It receives an instruction to move to coordinate P2 = (40, 60). Calculate the straight-line distance the pen travels. Assume the coordinates are in millimeters.

  2. A point on a sensor grid is initially at A = (-5, 8). An incoming signal causes a displacement represented by the vector <+7, -3>. What are the coordinates of the point after this displacement?

  3. A digital display has dimensions of 100 units by 80 units. A signal triggers a process that illuminates a rectangular region. The bottom-left corner of this region is at (10,10) and the top-right corner is at (60,40). Calculate the area of this illuminated region.

  4. An automated control system modifies a value X.

    • Signal type 1 (S1) increases X by 5.
    • Signal type 2 (S2) decreases X by 3.
    • Signal type 3 (S3) multiplies X by 2.

    If X starts at an initial value of 10, what is the final value of X after receiving the following sequence of signals: S1, S3, S2?

  5. A point (x, y) on a coordinate plane undergoes transformations based on an input.
    Transformation T1 is defined as: T1(x, y) = (x + 10, y - 5).
    Transformation T2 is defined as: T2(x, y) = (2x, y/2).

    1. If an input triggers T1 followed by T2 on an initial point (3, 10), what are the final coordinates?

    2. What if, starting from the same initial point (3, 10), T2 is applied first, and then T1 is applied to the result of T2? Would the final coordinates be the same as in part (a)? Show your calculations. (Enter the final coordinates)