Trimming coordinate Arrays
by Ruben
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):
Comments
Very cool concept
Thank you very much Paulius
Awesome work Ruben! Looking great ;D
Hey Ruben. I just came across this page while browsing. This class is simple but very useful. I am also trying to do something similar for one of my projects. I am just wondering how far you were able to go with this concept. Good job on everything here on this blog.
Hey venkat, thanks! Actually I got stuck somewhere along the process of finetuning the method. I really should pick it up again sometime.. I’ll keep you posted