Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 458 Bytes

README.md

File metadata and controls

25 lines (15 loc) · 458 Bytes

Interactive Shape Recognition

Implementaion of "A Simple Approach to Recognise Geometric Shapes Interactively" by Joaquim A. Jorge and Manuel J. Fonseca.

Installation

npm i interactive-shape-recognition

Usage

const detectShape = require("interactive-shape-recognition");

const points = [
  // .. [x, y] positions ..
];

const { shape } = detectShape(points)

// shape is one of: "CIRCLE", "LINE", "RECTANGLE", "UNKNOWN"