Skip to content

GPT-generated script to calculate the area of an irregular polygon with slanted walls and holes, using triangulation.

Notifications You must be signed in to change notification settings

damianc/gpt-polygon-area

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

gpt-polygon-area

GPT-generated script to calculate the area of an irregular polygon with slanted walls and holes, using triangulation.

Example

Example usage of the function:

let vertices = [
  { x: 0, y: 0 },
  { x: 5, y: 0 },
  { x: 3, y: 4 },
  { x: 1, y: 4 },
  { x: 2, y: 2, hole: true },
  { x: 3, y: 2, hole: true },
  { x: 2.5, y: 3, hole: true }
];

let area = calculatePolygonArea(vertices);
console.log(area); // output: 17

About

GPT-generated script to calculate the area of an irregular polygon with slanted walls and holes, using triangulation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published