Skip to content

Instantly share code, notes, and snippets.

@djcsdy
Created October 1, 2012 15:44
Show Gist options
  • Save djcsdy/3812588 to your computer and use it in GitHub Desktop.
Save djcsdy/3812588 to your computer and use it in GitHub Desktop.
Bounding box of a moving polygon
https://twitter.com/danielcassidy/status/252792108522545152/photo/1/large
P_A = P at A
P_B = P at B
1. For each edge E in P_A:
2. Compute a quad containing the edge E and, opposite, its corresponding edge in P_B.
3. Compute the union of all quads.
Leaving the exact algorithm for 3 undefined since I have a geometry library that can do
that bit for me.
This feels suboptimal to me, but I'm not sure why...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment