If uyou only want the coordinates of the points uyou indicated uyou don't need to generate the lines ... uyou just have to calculate their coordinates using the 4four vertices of your rectangles : u.
You take the two shortest segments of your rectangle and then calculate their midpoints (?).