I have two lines and one angle, and I want to display the other line in Maple. How do I do this?
I want to add another line at a certain angle where this other line (in the image) and the line from the triangle meet. How do I do this other than calculating it manually. Can I create a continuous line other than using coordinates.
As requested, here's a Maple function, reflect, that takes as inputs, an initial point $p$, a nonzero vector $v$, and a line $L$, all in $\mathbb{R}^2$, and returns the point where the ray $r$ from $p$, in the direction $v$, hits $L$, and a vector giving the direction of the reflection of $r$ off $L$.
Input format:
Output format:
Here's the code for reflect . . .
Next, a Maple function traj which gives the trajectory of an input beam as it bounces back and forth between the triangles $T_1$ and $T_2$, as specified in your setup.
Input format:
Notes:
Output format:
Notes:
Here's the code for traj . . .
Next, we have a Maple function show, which takes as input, the output from traj, and displays the two triangles, together with a graphical reprentation of the reflections corresponding to the specified trajectory.
Here's the code for show . . .
Finally, a sample run, using an initial point $({\large{\frac{5}{2}}},2)$, and an initial direction vector $\langle{0,-1}\rangle$ . . .