Image:
 Author: CPJchute Group: Default Filesize: 11.16 kB Date added: 2024-06-17 Rating: 5.4 Downloads: 545 Views: 185 Comments: 5 Ratings: 2 Times favored: 0 Made with: Algodoo v2.1.0 Tags:
|
The object in this scene is a polygon, and this code ONLY WORKS FOR POLYGONS.
This scene can create a bounding box for any polygon, as long as it is very simple. (This limit exists because the code uses normal for loops.)
This works by finding the furthest +X, -X, +Y, and -Y points, then using those points to make another polygon in the shape of a box.
This could be a bit useful for mouseOver checks on polygons or something.
Another scene coming a bit after this!
Edit: Positioning doesn't work well for concave polygons. |
Last edited at 2024/06/19 13:42:04 by CPJchute
Please log in to rate this scene
|