AnyMath 文档

三联体,三联体

该页面正在翻译中。

triplot(x, y; kwargs...)
triplot(positions; kwargs...)
triplot(triangles::Triangulation; kwargs...)

根据提供的位置或 三角测量 来自DelaunayTriangulation。jl.

地块类型

绘图类型别名 三联体,三联体 功能是 三联体,三联体.

例子:

A 三联体,三联体 绘制由任意点集生成的三角形网格。 输入数据可以是基于点的(如 散点,散点线条)或一个 三角测量 从https://github.com/DanielVandH/DelaunayTriangulation.jl[DelaunayTriangulation.jl]。 </无翻译>

using CairoMakie
using DelaunayTriangulation

using Random
Random.seed!(1234)

points = randn(Point2f, 50)
f, ax, tr = triplot(points, show_points = true, triangle_color = :lightblue)

tri = triangulate(points)
ax, tr = triplot(f[1, 2], tri, show_points = true)
f
a267c0b

您可以使用 三联体,三联体 想象https://juliageometry.github.io/DelaunayTriangulation.jl/stable/manual/ghost_triangles/[幽灵边缘]包围边界。 </无翻译>

using CairoMakie
using DelaunayTriangulation

n = 20
angles = range(0, 2pi, length = n+1)[1:end-1]
x = [cos.(angles); 2 .* cos.(angles .+ pi/n)]
y = [sin.(angles); 2 .* sin.(angles .+ pi/n)]
inner = [n:-1:1; n] # clockwise inner
outer = [(n+1):(2n); n+1] # counter-clockwise outer
boundary_nodes = [[outer], [inner]]
points = [x'; y']
tri = triangulate(points; boundary_nodes = boundary_nodes)

f, ax, tr = triplot(tri; show_ghost_edges = true, show_points = true)
f
28ae818

您还可以突出显示受约束的边缘并显示凸包,这在三角测量不再是凸包时特别有用。 </无翻译>

using CairoMakie
using DelaunayTriangulation

using Random
Random.seed!(1234)

outer = [
    (0.0,0.0),(2.0,1.0),(4.0,0.0),
    (6.0,2.0),(2.0,3.0),(3.0,4.0),
    (6.0,6.0),(0.0,6.0),(0.0,0.0)
]
inner = [
    (1.0,5.0),(2.0,4.0),(1.01,1.01),
    (1.0,1.0),(0.99,1.01),(1.0,5.0)
]
boundary_points = [[outer], [inner]]
boundary_nodes, points = convert_boundary_points_to_indices(boundary_points)
tri = triangulate(points; boundary_nodes = boundary_nodes)
refine!(tri; max_area=1e-3*get_area(tri))

f, ax, tr = triplot(tri, show_constrained_edges = true, constrained_edge_linewidth = 4, show_convex_hull = true)
f
bd5b958

属性

绑定_盒

默认值为 自动的

设置截断鬼边的边界框,它可以是 直肠2 (或 BBox的)或形式的元组 (xmin,xmax,ymin,ymax). 默认情况下,矩形将由 [a-eΔx,b+eΔx]×[c-eΔy,d+eΔy] 哪里 eghost_edge_extension_factor, Δx=b-aΔy=d-c 是矩形边的长度,以及 [a,b]×[c,d] 是三角测量中各点的边界框。

约束_edge_color

默认值为 :洋红色

设置受约束边缘的颜色。

约束_edge_linestyle

默认值为 @继承linestyle

设置约束边的线条样式。

约束_edge_linewidth

默认值为 @继承线宽

设置约束边的宽度。

convex_hull_color

默认值为 :红色

设置凸包的颜色。

convex_hull_linestyle

默认值为 :短跑

设置凸包的线条。

convex_hull_linewidth

默认值为 @继承线宽

设置凸包的宽度。

鬼怪,鬼怪

默认值为 :蓝色

设置幽灵边缘的颜色。

ghost_edge_extension_factor

默认值为 0.1

设置外部鬼边扩展到的矩形的扩展因子。

鬼怪,鬼怪

默认值为 @继承linestyle

设置幽灵边缘的线条。

鬼怪,鬼怪

默认值为 @继承线宽

设置幽灵边缘的宽度。

联合式,联合式

默认值为 @继承joinstyle

没有可用的文档。

n.线形,线形

默认值为 @继承linecap

没有可用的文档。

林泳,林泳

默认值为 :固体

设置三角形边的linestyle。

标记物

默认值为 @继承标记

设置点的形状。

标记色,标记色

默认值为 @继承markercolor

设置点的颜色。

标记大小

默认值为 @继承markersize

设置点的大小。

n.米特,米特

默认值为 @继承miter_limit

没有可用的文档。

重新计算中心

默认值为 错误

确定是否重新计算鬼缘方向的代表点。 请注意,这将发生变异 三。代表_point_list 直接。

显示_约束_edges

默认值为 错误

确定是否绘制约束边。

显示_convex_hull

默认值为 错误

确定是否绘制凸包。

显示_ghost_edges

默认值为 错误

确定是否绘制幽灵边缘。

显示点

默认值为 错误

确定是否绘制各个点。 请注意,这只会绘制三角测量中包含的点。

[医]斯特罗克色

默认值为 @继承patchstrokecolor

设置三角形边的颜色。

斯特罗克威德斯

默认值为 1

设置三角形边的线宽。

三角色,三角色

默认值为 :透明

设置三角形的颜色。