05-06-2023, 08:23 AM
I think now that the problem is in definitions. In post#1 it seems that with growing offset the window moves to the left. In my solution with growing 'x' the window moves to the right. So one should first set the definition of the offset once and for all and then find the exact relationship between the offset and my 'x'. (Or perhaps you already did this? It doesn't show in your post. And I'm sorry, I should have done it when I posted my solution.)
The way I thought was that 'x' is the coordinate of the left edge of the window when the origo is fixed at the left edge of some fixed line. The picture shows how I was thinking the situation:
The way I thought was that 'x' is the coordinate of the left edge of the window when the origo is fixed at the left edge of some fixed line. The picture shows how I was thinking the situation: