If you add a cosine wave to the plot (actually -cos(x)), you can see how the jerky, toggle-based curve is a mechanical approximation of a cosine, but squared off. What you actually want from the point of view of steam flow, is a square wave: the valve should switch instantly from one side to the other, exactly at the extremes of motion of the piston.
The whole elegance of having two pure harmonic motions is really not ideal at all from this point of view, which is why such mechanisms are not used on large engines.
There is another "mathematical" way of looking at the difference between engines that have separate sine and cosine connections to the flywheel, vs. a single sine wave connection. The combination of a sine and cosine wave define a direction of time, as it were. With time (x-axis) moving forwards to the right, the sine wave leads the cosine wave. If you reverse time, the cosine leads the sine. Therefore, this engine can only run in one direction (unless you interchange where the steam is coming in with the exhaust).
But a single sine wave does not change if you reverse time: it is symmetrical to time reversal, as they say in physics. That means, necessarily, that the single-connection engine above must be able to run in either direction without changing anything in the mechanism. Another way of looking at it is to say that the entire mechanism to the right of the flywheel has no way of knowing which direction the flywheel is turning. The harmonic, sine wave motion will be identical regardless of the direction of rotation, therefore it must work either way. So what determines which direction it actually goes? It's all down to which side the valve was flipped to when the engine is started up. The hysteresis of the valve creates the direction-of-time difference.
That's actually a thing in real engines: I saw a model steam engine with this type of valve just a few days before making this design. The guy showed me how you flip a lever before starting the engine, and it was clear that this lever was not redirecting steam. At the time I didn't understand how this could work, which caused me to worry about it until I finished this model, and now it all makes sense.
Literally hundreds of patents were issued over a span of centuries, focused on improved methods of controlling the timing of steam engine valves. For example, you might want to optimize for maximum work per unit of water used to create steam, instead of optimizing for maximum power from a given size of piston,. If so, you design the valves to admit a small amount of high-pressure steam at the start of the cycle, then close off quickly, allowing the steam to expand within the cylinder. The pressure drops off as the cylinder moves over, but you don't use any more steam. In practice this is said to get you about 2/3 of the work for 1/3 of the water, compared to applying full steam pressure for the whole stroke.
Towards the end, before the steam engine was replaced completely by internal combustion and turbine engines, the valves were mostly "poppet" style valves, driven by cams. The timing could be changed at will to optimize for torque or efficiency.
P.S. I love my laser cutter! As I said, I came up with this design while working on a talk. That was Monday evening, and my flight out to the conference was Wednesday early morning. Around 11PM that night I decided it was nuts to try to actually make the engine in time to take to the conference, so I started working on the CAD files. By around 1AM Tuesday morning I had a design ready (based on my Folded Steam Engine, lengthened a bit and with the valve connection replaced with the new design). Around 10AM Tuesday morning I went to the shop and laser cut the new design. It took four or five re-cuttings of the piston and toggle lever to fine-tune the dimensions so the valve moves the correct distance (taking into account the reality of the laser cut width and the slop in the screw pivot joint, which are a bit hard to predict in the drawing).
Once the design was good, I made six copies, put a couple of them together, then Nick and I photographed a time lapse of the new design. All that took maybe 2-3 hours.
I really do not know of any tool that works so fast and so perfectly to churn out beautiful-looking mechanical parts. I really wish 3D printers could come anywhere near this level of speed, economy, and beauty of results. While waiting for that, I will continue to live in my 2D laser cutter world.