Consider a room ten units long in the x, y, and z directions. Speci�cally, the walls of the room are the four planes, x = 0, x = 10, y = 0, and y = 10, and the floor and ceiling are z = 0 and z = 10,respectively. A flat triangular mirror is mounted in one of the corners of the ceiling. The corners of the mirror are at locations (10; 9; 10), (10; 10; 9), and (9; 10; 10). You are sitting at location (5; 0; 0)

playing with your new green laser pointer.

(a) If you aim your laser pointer directly at the corner of the room with coordinates (10; 10; 10),
determine the coordinates where the beam will hit the walls, or
floor, of the room. (Hint: an
incoming ray of light, and the surface normal where the ray hits the surface, form a plane. The reflected ray is in the same plane. Also, the angle between the incoming ray and the normal is
the same as the angle between the normal and the reflected ray.)

(b) Suppose the flat mirror is replaced with one octant of a spherical mirror of radius 1. The corners
of the new spherical mirror are again located at (10; 9; 10), (10; 10; 9), and (9; 10; 10). If you
again aim your laser pointer directly at the corner of the room with coordinates (10; 10; 10),
determine the new coordinates where the beam will hit the walls, or floor, of the room. (Hint:
a sphere has the property that at a point P on the surface, the normal to the surface, n, is
parallel to the vector from the center of the sphere to the point P.)

THIS IS HARD

YES THIS IS HARD

To solve both parts (a) and (b) of the problem, we will use the laws of reflection which state that the angle of incidence equals the angle of reflection:

1. (a) Aim the laser pointer at the corner of the room with coordinates (10, 10, 10):
- The laser beam starts at your position (5, 0, 0).
- The beam hits the mirror at point (10, 10, 10).
- The normal to the mirror at this point can be found by taking the vector from the center of the mirror (9.5, 9.5, 9.5) to the point of incidence (10, 10, 10). This vector is (10 - 9.5, 10 - 9.5, 10 - 9.5) = (0.5, 0.5, 0.5).
- The incoming ray of light and the surface normal form a plane, and the reflected ray is in the same plane.
- Calculate the angle between the incoming ray and the normal. Use the dot product formula: θ = arccos((v . u) /(|v| |u|)) where v is the incoming ray and u is the surface normal.
- In this case, the incoming ray is the vector from your position (5, 0, 0) to the point of incidence (10, 10, 10), which is (10 - 5, 10 - 0, 10 - 0) = (5, 10, 10).
- The angle between the incoming ray and the normal can be found as: θ = arccos(((5, 10, 10) . (0.5, 0.5, 0.5)) / (|(5, 10, 10)| |(0.5, 0.5, 0.5)|)).
- Calculate the normal reflection vector by using the formula: v_r = v - 2(n . v) n, where v is the incoming ray and n is the surface normal.
- In this case, v = (5, 10, 10) and n = (0.5, 0.5, 0.5).
- Calculate the reflection vector: v_r = (5, 10, 10) - 2((0.5, 0.5, 0.5) . (5, 10, 10))(0.5, 0.5, 0.5).
- The reflection vector gives you the direction in which the laser beam will travel after hitting the mirror.
- Finally, determine where the reflected beam will hit the walls or the floor by extending the beam until it intersects with the corresponding planes.

2. (b) Consider a spherical mirror instead of a flat mirror, which consists of one octant of a sphere with radius 1:
- The center of the spherical mirror is located at (9.5, 9.5, 9.5).
- Repeat the steps from part (a) to calculate the surface normal at the point of incidence (10, 10, 10).
- Calculate the incoming ray vector from your position (5, 0, 0) to the point of incidence (10, 10, 10).
- Calculate the reflection vector using the formula: v_r = v - 2(n . v) n, where v is the incoming ray and n is the surface normal.
- Modify the reflection vector v_r to take into account the spherical mirror's shape. Since the surface normal is parallel to the vector from the center of the sphere to the point P, we can subtract the vector from the center of the sphere to the point of incidence from the reflection vector.
- Finally, determine where the reflected beam will hit the walls or the floor by extending the beam until it intersects with the corresponding planes.

Please note that the calculations require vectors and vector operations. Make sure to use knowledge of linear algebra and vector arithmetic to solve these equations accurately.