I've used the shift list component to good effect here. Step one is to reduce the list as the first and last points are the same. Then create vectors, based on a points previous and next point, to compare and then order a list based on their original position to get the most acute angle. And finally shift the list based on this new knowledge. There's one thing I haven't done in the definition below and that is to duplicate the first point at the end to make a periodic curve based on these control points.
Danny Boyes
I've used the shift list component to good effect here. Step one is to reduce the list as the first and last points are the same. Then create vectors, based on a points previous and next point, to compare and then order a list based on their original position to get the most acute angle. And finally shift the list based on this new knowledge. There's one thing I haven't done in the definition below and that is to duplicate the first point at the end to make a periodic curve based on these control points.
Jul 9, 2010