Actually this page is better

https://www.pveducation.org/pvcdrom/properties-of-sunlight/elevation-angleUse the formula for 'elevation angle' for any latitude, hour of day and 'declination' (which corresponds to season).

You can easily reproduce this in a spreadsheet and perfectly replicate the 'zig zag' effect.

I think Tom will object that assume 'patterns'. Well fine, we can deal with that later but the question was whether the elevation has anything to do with the sin function.

YES IT DOES!

[EDIT] Actually that formula is well worth playing around with. Put in a declination angle of 23.49, meaning you are at the

~~winter~~ spring solstice in northern hemisphere, and put in a latitude of 66.567 (i.e. the latitude of the arctic circle). Then the bottom of the sine wave just touches the horizon. If you then head further north the wave gets shallower and shallower until at 90 degrees it is a straight line.