Skip to content

Instantly share code, notes, and snippets.

@alecmce
Created October 10, 2010 01:09
Show Gist options
  • Save alecmce/618803 to your computer and use it in GitHub Desktop.
Save alecmce/618803 to your computer and use it in GitHub Desktop.
var list:Vector.<Point> = new Vector.<Point>();
list[0] = new Point(1, 1);
list[1] = new Point(-1, 1);
list[2] = new Point(-1, -1);
list[3] = new Point(1, -1);
var polygon:Polygon = new Polygon(list);
// INTERPRETATION 1:
// polygon is defined by vertices and represents a square the sides of which lie parallel
// to the axes, and has an area of 4.
// INTERPRETATION 2:
// polygon is defined by displacements and represents a square the sides of which lie at 45
// degree angles from the axes and has an area of 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment