diff --git a/src/examples.jl b/src/examples.jl index 6a53dcf4..62d1cd02 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -962,8 +962,10 @@ const _examples = PlotExample[ """ Allows to plot arbitrary 3d meshes. If only x,y,z are given the mesh is generated automatically. You can also specify the connections using the connections keyword. - The connections are specified using a tuple of vectors. Each vector contains the 0-based indices of one point of a triangle, - such that elements at the same position of these vectors form a triangle. + The connections can be specified in two ways: Either as a tuple of vectors where each vector + contains the 0-based indices of one point of a triangle, such that elements at the same + position of these vectors form a triangle. Or as a vector of NTuple{3,Ints} where each element + contains the 1-based indices of the three points of a triangle. """, [ :( @@ -979,13 +981,14 @@ const _examples = PlotExample[ i = [0, 0, 0, 1] j = [1, 2, 3, 2] k = [2, 3, 1, 3] + # Or: cns = [(1, 2, 3), (1, 3, 4), (1, 4, 2), (2, 3, 4)] (1-based indexing) # the four triangles gives above give a tetrahedron mesh3d( x, y, z; - connections = (i, j, k), + connections = (i, j, k), # connections = cns title = "triangles", xlabel = "x", ylabel = "y",