01-26-2018, 11:36 AM
Given a stroke with 4 simple Bezier splines:
(*) you know who you are...
but before you(*) jump with joy, I don't know yet how to compute the intersection of these curves (the corners of the squares), assuming it is anatically possible.
Otherwise, the algorithm is:
Otherwise, the algorithm is:
- take two opposite sides: the guide strokes and the remaining sides, the shape strokes
- extract from the two existing shape strokes the angle of incidence on the guide stroke and the relative distance of the tangent points to the distance of the two anchors
- with this data you can map either shape stroke along the guides at some percentage: compute the two anchors, and given angle and distance, compute the two tangents
- so do the computation for the same percent form the two shapes, and interpolate the tangents using the percentage: two anchors, two tangents, you have a line between the two guides.
- rinse and repeat
(*) you know who you are...