I’m trying to place two objects next to each other with the tip of each object connecting with the other.
I have been able to do this when the second object is rotated to the right on the y-axis because the tip of that object is always the min value of a bounding box. When the object is rotated to the left on the y-axis the tip of that object is somewhere along the x-axis. The information that I have is the x and y-axis of the bounding box, as well as the dimensions of the trapezoid/object.
Does anyone know how I can calculate this?
An image for clarification:
I have found a post on math stackexchange (https://stackoverflow.com/questions/9971230/calculate-rotated-rectangle-size-from-known-bounding-box-coordinates) which seemed at first to be of help, but the results of my calculations are always absurd and cannot be right so I’m probably doing something wrong or looking in the wrong direction.
Any tips are welcome!