PHP Classes

Polygon: Perform geometric operations on polygons

Recommend this page to a friend!
  Info   Screenshots Screenshots   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (14)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 69%Total: 3,725 All time: 886 This week: 148Up
Version License PHP version Categories
polygon 1.6GNU General Publi...3Algorithms, Geography, Math


This package can be used to perform different types of geometric operations with polygons.

It provides generic polygon and vertex classes that support mixing lines and arc segments between vertices. Polygons may be self-intersecting.

It provides means to perform boolean operations AND and OR (Intersect and Union) with the shapes and compute shape clipping (A-B and B-A).

Innovation Award
PHP Programming Innovation award nominee
August 2005
Number 5

Prize: One book of choice by SAMS
Certain types of image manipulation applications need to execute operations on images that involve shapes, for instance to define clipping areas. Such areas are defined by individual polygons or combinations of multiple polygons.

This class provides means to perform operations on shapes defined by polygons delimited by lines or arcs. It is useful for image manipulation applications like, for instance, those that involve maps.

Manuel Lemos
Picture of Brenor Brophy
Name: Brenor Brophy <contact>
Classes: 2 packages by
Country: United States United States
Age: 56
All time rank: 39748 in United States United States
Week rank: 358 Up44 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

  • poly_ex1.gif
  • poly_ex2.gif
  • poly_ex3.gif
  • poly_ex4.gif
  • poly_ex5.gif
  • poly_ex6.gif
  • poly_ex7.gif
  • poly_ex8.gif
  Files folder image Files  
File Role Description
Accessible without login Plain text file polyExample.php Example Example - See screen shots for output
Accessible without login Plain text file polygon.php Class Polygon class
Accessible without login HTML file readme.htm Doc. Documentation
Accessible without login Plain text file vertex.php Class vertex and segment objects used by polygon

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:886
This week:148Up
User Ratings User Comments (3)
 All time