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):
February 6th, 2008 | Quote
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
February 4th, 2008 | Quote
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.
May 14th, 2007 | Quote
Awesome work Ruben! Looking great ;D
May 14th, 2007 | Quote
Thank you very much Paulius
May 14th, 2007 | Quote
Very cool concept