I need to be able to create a rectangle with height x from two points. This is probably not clear enough so I tried to draw it:
The two points that I have are the centroids of those circles, and what I need is the rectangle in orange. I have little experience with GIS, and my idea is probably silly, but I'm thinking that if I create a line connecting the two points, and find the intersection in the circle and then find a point 90 degrees from that point, I could calculate the 4 points that I need to create a rectangle.
This example in real life is like a tractor working from point A to point B, and there's this equipment attached to the tractor which has a known width, and the rectangle tells me the area that this tractor did something.
I'm working with this 'map' on a web page, in JavaScript with Turf.js.