Refer to the figure attached. Choose x-axis along and y-axis along with the origin at .
can be interchanged.
on sides and we have , . With the additional condition that ,
on sides and we have the abscissa of is and hence abscissa of has to be . Let the ordinate of be then we have ordinate of has to be and it has to satisfy the line equation with the additional bound constraints and
Can be done on similar lines of Case2.
Now use the rotational matrix to translate to the Rectangular Cartesian Co-ordinates.