In order to compute efficiently we have to use three frames of reference. This is because daily positions of the Sun at any hour are easiest to express in the equatorial astronomical coordinates. Equatorial coordinate lines are our terrestrial meridians an parallels projected onto the celestial sphere and bearing somewhat different names. Hour angle is the angle between body's meridian and some reference meridian. Greenwhich Hour Angle assumes Prime Meridian as a starting point, Local Hour Angle is measured from our local meridian.
Horizontal coordinates use angles that depend on observer's.
Having horizontal coordinates we calculate the direction of the Sun ray in the third frames, being Cartesian frames hooked to the dial. Having this direction we pass the Sun beam through the end of the style and calculate the piercing point on the dial plane. This point corresponds to the shadow cast by the style end at the time for which the declination and hour angle of the Sun were assumed. Having computer or programmable calculator we perform those calculations easily. In good old times geometrical methods were used that required iamgination and skill.