Search Tools Links Login

Intersection of HUNDREDS rectangles, no API!


Visual Basic 6, or VB Classic

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 :)

Original Author: Pietro ing. Cecchi

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 95 times

Categories

Visual Basic 6

Attachments

Intersecti248818182001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 24,120 bytes


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.