Crvs on sphere srf, wanna set rectangular srf on intersections

I drew a vertical and horizontal line on the sphere.
And I want to have square surfaces at those intersections.
But every time I control the spacing of vertical and horizontal lines in a grasshopper, the order of the points is different, so I can’t set up a particular algorithm.
I believe you guys can help solve this.

This is the result of my work.