I am trying to create a graphics application where the user can use an arbitrary shape as a "brush", which will be swept along the drawing path. The shape may be transformed along the path (rotated, resized, etc).
I read this paper, and it seemed promising: Approximate General Sweep Boundary of a 2D Curved Object
My understanding of the method is this:
- Simplify the shape to a polygon
- Sample the shape at various times t along the curve
- For each t, connect each point of the polygon at t the corresponding point of the polygon at t-1
- Calculate the convex hull of the joined shapes
- Move to t+1
Do I have it right? Is this the best way to approach this problem?
Aucun commentaire:
Enregistrer un commentaire