Trimming coordinate Arrays

A few days ago I started creating some (AS3) classes that made it easier to work with geometry.

One method in the Geom class lets you trim a shape (actually an Array of Points) with a Rectangle, trimming off everything that is outside of the Rectangle. Do note that is still a very early version, and there are still some major tweaks to be done. At this point, the method only finds intersections between the lines of the provided coordinates Array and the lines of the Rectangle.

Anyways, here’s an example so you get an idea of what I’m trying to do (hover over the star shape):

5 Responses

Note that comments are displayed in reverse chronological order with topmost comments being freshest. Subscribe | Comment

Leave a Reply