Convex hull and diameter of 2d point set

Category: Python - Education

This script returns the convex hull (separated into upper and lower chains of vertices) and the diameter (farthest pair of points), given input consisting of a list of 2d points represented as pairs (x,y). The convex hull algorithm is Graham's scan, using a coordinate-based sorted order rather than the more commonly seen radial sorted order. A rotating calipers algorithm generates candidate pairs of vertices for the diameter calculation. Care was taken handling tricky cases such as pairs of points with the same x-coordinate and colinear triples of points. Date: 19 March, 2012


Convex Hull - 2d Point Sets - Convex Hull Algorithm - Convex - Hull - 2d

Homepage: http://code.activestate.com/

Developer: code.activestate.com

License: Freeware

Operating System: All

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

This simple code calculates the convex hull of a set of 2D points and generates EPS files to visualise them.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This simple code calculates the convex hull of a set of 2D points and generates EPS files to visualise them.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


This script returns the convex hull (separated into upper and lower chains of vertices) and the diameter (farthest pair of points), given input consisting of a list of 2d points represented as pairs (x,y).

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


The Parma Polyhedra Library (PPL) is a modern C library providing numerical abstractions especially targeted at applications in the field of analysis and verification of complex systems.

developer Developer: ftp.cs.unipr.it
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


Empty Clip is a top-down, 2D Action RPG.

developer Developer: emptyclip
license License: GNU General Public License (GPL)
operating systems Operating System: Linux, WinXP


Solis is a 2D action/adventure open source game in the style of Zelda, Terranigma or Secret of Mana for the SNES.

developer Developer: solis
license License: Public Domain
operating systems Operating System: WinXP


Ultra Blocks is a simple 2D puzzle game for Win32/DirectX 8.

developer Developer: ultrablocks
license License: GNU General Public License (GPL)
operating systems Operating System: 32-bit MS Windows (95/98), All 32-bit MS Windows (95/98/NT/2000/XP)


This script implements set operations using sorted lists as the underlying data structure.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This script allows you to choose a random object from an iterated list.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All