How to determine the limits of object transformations

Viewed 28

Let's say, for example, that we have a cubic Bezier curve in a bounded Cartesian space, where x ranges from 0 to 500, and y ranges from 0 to 300:

enter image description here

And I want to manipulate this curve with scale, rotation, and translation matrices, with the limitations that I do not want any point on this curve to step outside the 500x300 grid.

Given this curve, is there a way to compute (EDIT: i.e. predict) limits to the scale, rotation, and translation parameters a priori such that the resulting transformations to the curve will never cause it to step outside this grid?

1 Answers

You just need the bounding box of the curve and then apply the transformations to the box to see when it goes out of range. Just iterate through the curve to find the bounding box.

fig

Related