how to calculate diagonally center points of rectangle, triangle, circle and polygons. anyone help me.
In the attachment image I need x1,y1 and x2,y2 points like this for some other shapes.
But if the following conditions are satisfied you can find some relations between the variables in question.
a) The sides of the rectangle are parallel to the coordinate axes.
b) The measures of the rectangle are (known) constant values: w, l.
If you want to get more relations then you must know the coordinates of the vertices of the rectangle.