From this week’s(2020/07/03) Parametric Camp, Professor Jose Luis García del Castillo y López challenged us to do Chaikin’s Algorithm by ourselves.
I think it will be great if I made some notes about how I thought and my work here.
The code is pretty straight forward, some little thing might notice
- while iterating thought points, the index // should careful segmentation fault
- Points in RhinoCommon can work like vector, this concept inherit from linear algebra, anyway this means you can multiple them
scale the vector
1 | private void RunScript(List<Point3d> polyLinePts, int iterNum, ref object A) |
Thing that I have not achieved,
- the endpoints are not included.
- Have not tackled the
closed
polyline situation
Some thought about Closed one, should deal with the iteration, especially the end point. LOL
We can also change the ratio(0.25, 0.75) to something else
One thing can be noticed that there is always one point will converge to the original segment.
While iteration goes larger the point will be the middle point of the original segment.