Two lasers between two mirrors What if we have a corridor comprised of two parallel mirrors?

|          |
|          |
|          |
|          |
|          |
|          |
|          |
|          |
|          |
|          |


Now, we shine a laser down it...

|  \       |
|   \      |
|    \     |
|     \    |
|      \   |
|       \  |
|        \ |
|         \|
|         /|
|        / |


Oh, look. It bounced, towards the end, there.

What if we draw two lasers BUT going in the opposite direction?

|  \    /  |
|   \  /   |
|    \/    |
|    /\    |
|   /  \   |
|  /    \  |
| /      \ |
|/        \|
|\        /|
| \      / |


Hmm, they didn't seem to meet, there. That's convenient. What happens if both lasers take up the same space?

|  \     / |
|   \   /  |
|    \ /   |
|     X    |
|    / \   |
|   /   \  |
|  /     \ |
| /       \|
|/        /|
|\       / |


I guess that was pretty obvious, huh?



Drawing these diagrams by hand is pretty laborious (trust me on this). Perhaps some code could do it for us?


Write some code to output two parallel mirrors, with two bouncing, intersecting lasers.
Input (all integers):


The width of the corridor
The length of the corridor
Starting position of the right-going laser (zero-indexed, must be less than width)
Starting position of the left-going laser (zero-indexed, must be less than width)

Process


If a laser is right going, it will be drawn one space to the right on the following line.
If a laser is left going, it will be drawn one space to the left on the following line.
If a laser can not take it's sideways step, it will change it's direction, but not it's position. 
If both laser are at the same index, print an upper-case X at that index.

Output


A string with multiple lines
Each line starts and ends with a pipe character (|)
Right-going laser are denoted by a back slash (\)
Left-going laser are denoted by a forward slash (/)
The intersection of two lasers is denoted by an upper-case X.

Any language
I'd like to see TIO links
Attempt to fix it in the smallest number of bytes




Test cases

width: 6
length: 10
right-going: 1
left-going: 4

| \  / |
|  \/  |
|  /\  |
| /  \ |
|/    \|
|\    /|
| \  / |
|  \/  |
|  /\  |
| /  \ |


width: 6
length: 10
right-going: 0
left-going: 1

|\/    |
|/\    |
|\ \   |
| \ \  |
|  \ \ |
|   \ \|
|    \/|
|    /\|
|   / /|
|  / / |


width: 4
length: 10
right-going: 2
left-going: 0

|/ \ |
|\  \|
| \ /|
|  X |
| / \|
|/  /|
|\ / |
| X  |
|/ \ |
|\  \|


width: 20
length: 5
right-going: 5
left-going: 15

|     \         /    |
|      \       /     |
|       \     /      |
|        \   /       |
|         \ /        |


width: 5
length: 6
right-going: 2
left-going: 2

|  X  |
| / \ |
|/   \|
|\   /|
| \ / |
|  X  |


width: 1
length: 2
right-going: 0
left-going: 0

|X|
|X|
JavaScript (ES6), 149 bytes
Takes input in currying syntax (w)(h)([a,b]).

w=&gt;h=&gt;g=(p,d=[1,-1],s=Array(w).fill` `)=&gt;h--?`|${p=p.map((x,i)=&gt;~(k=d[i],s[x]='/X\\'[x-p[i^1]?k+1:1],x+=k)&amp;&amp;x&lt;w?x:x+(d[i]=-k)),s.join``}|
`+g(p,d):''

Try it online!
Commented
w =&gt; h =&gt;                  // w = width, h = height
  g = (                    // g = recursive function taking:
    p,                     //   p[] = array holding the point coordinates
    d = [1, -1],           //   d[] = directions
    s = Array(w).fill` `   //   s = array of w spaces (we can't use a string because it's
  ) =&gt;                     //       immutable in JS)
    h-- ?                  // if we haven't reached the last row yet:
      `|${                 //   append the left pipe
      p = p.map((x, i) =&gt;  //   for each x at position i in p[]:
        ~(k = d[i],        //     k = direction for this point
          s[x] = '/X\\'[   //     insert either '/', 'X' or '\' at position x in s
            x - p[i ^ 1] ? //     if p[0] != p[1]:
              k + 1        //       use the direction
            :              //     else:
              1            //       force 'X'
          ], x += k        //     add k to x
        ) &amp;&amp;               //     if the result is not equal to -1
        x &lt; w ?            //     and is less than w:
          x                //       use the current value of x
        :                  //     else:
          x + (d[i] = -k)  //       change the direction and restore the initial value of x
      ),                   //   end of map()
      s.join``}|\n` +      //   join and append s; append the right bar and a linefeed
      g(p, d)              //   followed by the result of a recursive call
    :                      // else:
      ''                   //   stop recursion