forked from observablehq/plot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdelaunay.d.ts
More file actions
76 lines (70 loc) · 3.65 KB
/
delaunay.d.ts
File metadata and controls
76 lines (70 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import type {ChannelValue, ChannelValueSpec} from "../channel.js";
import type {CurveOptions} from "../curve.js";
import type {Data, MarkOptions, RenderableMark} from "../mark.js";
import type {MarkerOptions} from "../marker.js";
/** Options for the Delaunay marks. */
export interface DelaunayOptions extends MarkOptions, MarkerOptions, CurveOptions {
/** The horizontal position channel, typically bound to the *x* scale. */
x?: ChannelValueSpec;
/** The vertical position channel, typically bound to the *y* scale. */
y?: ChannelValueSpec;
/** An optional ordinal channel for grouping to produce multiple (possibly overlapping) triangulations. */
z?: ChannelValue;
}
/**
* Returns a mark that draws links for each edge of the Delaunay triangulation
* of the points given by the **x** and **y** channels. Like the link mark,
* except that **x1**, **y1**, **x2**, and **y2** are derived automatically from
* **x** and **y**. When an aesthetic channel is specified (such as **stroke**
* or **strokeWidth**), the link inherits the corresponding channel value from
* one of its two endpoints arbitrarily.
*
* If **z** is specified, the input points are grouped by *z*, producing a
* separate Delaunay triangulation for each group.
*/
export function delaunayLink(data?: Data, options?: DelaunayOptions): RenderableMark;
/**
* Returns a mark that draws a mesh of the Delaunay triangulation of the points
* given by the **x** and **y** channels. The **stroke** option defaults to
* _currentColor_, and the **strokeOpacity** defaults to 0.2; the **fill**
* option is not supported. When an aesthetic channel is specified (such as
* **stroke** or **strokeWidth**), the mesh inherits the corresponding channel
* value from one of its constituent points arbitrarily.
*
* If **z** is specified, the input points are grouped by *z*, producing a
* separate Delaunay triangulation for each group.
*/
export function delaunayMesh(data?: Data, options?: DelaunayOptions): RenderableMark;
/**
* Returns a mark that draws a convex hull around the points given by the **x**
* and **y** channels. The **stroke** option defaults to _currentColor_ and the
* **fill** option defaults to _none_. When an aesthetic channel is specified
* (such as **stroke** or **strokeWidth**), the hull inherits the corresponding
* channel value from one of its constituent points arbitrarily.
*
* If **z** is specified, the input points are grouped by *z*, producing a
* separate hull for each group. If **z** is not specified, it defaults to the
* **fill** channel, if any, or the **stroke** channel, if any.
*/
export function hull(data?: Data, options?: DelaunayOptions): RenderableMark;
/**
* Returns a mark that draws polygons for each cell of the Voronoi tesselation
* of the points given by the **x** and **y** channels.
*
* If **z** is specified, the input points are grouped by *z*, producing a
* separate Voronoi tesselation for each group.
*/
export function voronoi(data?: Data, options?: DelaunayOptions): RenderableMark;
/**
* Returns a mark that draws a mesh for the cell boundaries of the Voronoi
* tesselation of the points given by the **x** and **y** channels. The
* **stroke** option defaults to _currentColor_, and the **strokeOpacity**
* defaults to 0.2. The **fill** option is not supported. When an aesthetic
* channel is specified (such as **stroke** or **strokeWidth**), the mesh
* inherits the corresponding channel value from one of its constituent points
* arbitrarily.
*
* If **z** is specified, the input points are grouped by *z*, producing a
* separate Voronoi tesselation for each group.
*/
export function voronoiMesh(data?: Data, options?: DelaunayOptions): RenderableMark;