Hi Sly,

The algorithm used in the convex hull demo as described in the source code
is the graham scan with a complexity of O(nlogn), for 2D its the most
efficient method for calculating a convex hull however for higher dimensional
hulls 3D,4D,5D etc, QHull algorithm is advisable.

these are some good intros into the topic:

http://crypto.cs.mcgill.ca/~crepeau/...ConvexHull.pdf
http://camwiki.ucam.org/index.php?title=Graham_scan


As far as the record passing issue, AFAIK in object pascal when you pass
a type in a procedure or function with "var" or "out" reserved words you
are actually telling the compiler to pass the type by reference hence
there are no extra copy operations occurring.

As for inlining, I've had a chance to use Delphi 2005, however at this
point I don't see any need to begin modifying the code for compatibility
with "extra" features that have not yet become mainstream in the Delphi
world. Inlining is good if you know when and where to use it properly...


Regards




Arash Partow

__________________________________________________ ______
Be one who knows what they don't know,
Instead of being one who knows not what they don't know,
Thinking they know everything about all things.