Skip to content

Triangle

Module Geometry.Triangles

In ixfx, a Triangle consists of three Points

type Triangle = {
a: Point;
b: Point;
c: Point;
}

Once you have that there are a bunch of functions to help you work with circles.

Comparison with other shapes

Creating/conversion

Barycentric coordinates

Kinds

// Sub module
import { Triangles } from "@ixfx/geometry.js"
// Eg: Triangles.bbox();
// Whole module
import * as Geometry from "@ixfx/geometry.js"
// Eg: Geometry.Triangles.bbox();
// From bundle
import { Geometry } from "@ixfx"
// Eg: Geometry.Triangles.bbox();
// And within your HTML's <HEAD> </HEAD> block:
<script type="importmap">{ "imports": { "@ixfx":"/ixfx/index.js", "@ixfx/": "/ixfx/" } }</script>