Understanding Yellowtail : quad calculations
in
Core Library Questions
•
1 year ago
Hi,
Right now, what (I think) I understand about it :
The gesture's "skeleton" is a path (a set of points) created when you drag the mouse. For each point on the path, a rectangle is created and rotated appropriately in order to "stick" with the next one and create continuity. Then, all the points go through the smooth() function which just smoothes the final shape.
Despite trying hard, I can't seem to understand how Yellowtail calculates these rectangles, could anyone explain this ?
Intuitively I would have imagined this solution :
But I have tried implementing this and it has a lot of precision issues, unlike Yellowtail.
Right now, what (I think) I understand about it :
The gesture's "skeleton" is a path (a set of points) created when you drag the mouse. For each point on the path, a rectangle is created and rotated appropriately in order to "stick" with the next one and create continuity. Then, all the points go through the smooth() function which just smoothes the final shape.
Despite trying hard, I can't seem to understand how Yellowtail calculates these rectangles, could anyone explain this ?
Intuitively I would have imagined this solution :
Calculate for each point the slope from point n to point n+1 in order to get a line L1
Calculate L2 so that L2 is perpendicular to L1 and passes through nMid which is the point in between n and n+1
Place one point on L2 at x distance of nMid
Place one point on L2 at -x distance of nMid
But I have tried implementing this and it has a lot of precision issues, unlike Yellowtail.
1