Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: Add new vertice ?

Here is what I would do if no better idea :
  • Calcule distance between user point and a each line shapes created from each couple of vertex (0-1, 1-2, 2-3...) of the given shape
  • minimal distance found return memorized start and end vertices of the segment to cut,
  • calculate XY of the new vertex on this segment using either start or end XY and distance, according to the fact that minimal distance is the perpendicular height of a Pythagore triangle.
Hoping I didn't write stupid idea that would last here for years, any remarks will be appreciated !

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>