The equations for a vertical sundial are quite similar to those for a horizontal sundial. And the results might look like the dial is just rotated, but the angles are different.
Computation of the angles for the hour lines is fairly simple, I give two methods below. They both produce the same results, but the first method allows the use of the ATAN2 function to ensure \(\theta\) is in the correct quadrant. The second method is just shorter.