I have some scattered points for which I need to draw a rectangle / circle / polygon as a background. I have only coordinates (x,y) of selected points.what will be the maths formula to this? These points are inside canvas and I need to draw the outer shape for selected points in canvas itself. Tried with canvas rect .
Attaching one more image:
Asked
Active
Viewed 387 times
1
-
https://stackoverflow.com/questions/22512319/what-is-aabb-collision-detection?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – meowgoesthedog May 02 '18 at 14:42
-
Thanks for the link . Can you also help me with the formula for minimum bounding box - (BminX–BmaxX, BminY–BmaxY, and BminZ–BmaxZ are the ranges of each exis of the AABB) . I am not understanding how to calculate BminX BmaxX etc. – Sowmya May 02 '18 at 16:07
-
minX is the smallest X coordinate of all points, maxX is the largest. Same for Y and Z. – meowgoesthedog May 02 '18 at 16:18