# How can i draw a rectangle through two points on a spherical coordinate system?

So I have two points, as an example:

x1 = (49.233381, 28.483318);
x2 = (49.233366, 28.483529); Using this points i need to draw rectangle. Which have a=200m and b=250m as on picture: The question is how can i do it using two points of latitude and longitude? As i understand i should know also radius and scale.

Suggested function signature:

[(latitude,longitude),...,(latitude,longitude)] = y(x1,x2,a,b,radius,scale,...))

How can i calculate all 4 points using this input params?

• There seem to be a number of things to decide here. First, you have to decide how your "latitude" and "longitude" relate to $x$ and $y.$ There are many different ways to do that. Second, there are not really any rectangles on a sphere, so you have to decide what you are calling a "rectangle" (or if it is only a rectangle when you project to the $x,y$ plane). If the radius of the sphere is very large in comparison to the rectangle, however, there are some relatively obvious choices. – David K May 3 at 13:08