Skip to content

pangfeng/kid-fermat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kid-fermat

Get fermat point of more than three points.

In geometry, the Fermat point of a triangle, also called the Torricelli point or Fermat-Torricelli point, is a point such that the total distance from the three vertices of the triangle to the point is the minimum possible.

Use kid-fermat.js you can get the 'fermat point' of more than three points.

Example:

  var points = [{x:20,y:234},{x:140,y:35},{x:98,y:149},{x:220,y:359},{x:657,y:127},{x:50,y:91}];
  
  var fermatPoint = kid.getFermatPoint(points); // {x: 98.01177171066529, y: 149.01494620065168}

About

Get fermat point of more than three points.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published