VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Intersection of HUNDREDS rectangles, no API

pietro ing. cecchi  (8 Submissions)   Math/Dates   Visual Basic 3.0   Advanced   Wed 3rd February 2021

Curious of how to get the intersection of hundreds rectangles almost instantly
and with no API? Then come and see!...
Arabian and italian algorithms in play!
+++++
This little demo shows live intersection of 2 up to hundreds rectangles.
It produces: A) a boolean indicating whether all rectangles intersect
B) the intersection rectangle itself
The homemade method for finding the intersection rectangle (in 'IntersectHomeMade' function)
is mine and consists of defining all (2*number of rectangles)^2 intersection points (both real
and virtual) and then filtering them to find the only 4 points belonging to all rectangles.
A very unusual way, isn't?
In the same routine, the method for finding whether or not the 2 rectangles intersect (boolean
value) is not fully mine but derived by a recent post on the planet: 'Knowing whether two
objects intersect' (by Tarek Said, level Intermediate, Coding Standards, submitted august 12 2K1).
I hope yow like the effort, have fun :)

Rate Intersection of HUNDREDS rectangles, no API (3(3 Vote))

Download Intersection of HUNDREDS rectangles, no API

Intersection of HUNDREDS rectangles, no API Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters