From 718bce90f60cf89f091e73d4f74ff6e6768455fa Mon Sep 17 00:00:00 2001 From: Adrian Dawid Date: Thu, 13 Aug 2020 21:24:54 +0200 Subject: [PATCH] Add mesh3d example --- src/examples.jl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/examples.jl b/src/examples.jl index 814083c2..0ede2a50 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -511,6 +511,30 @@ const _examples = PlotExample[ ), ], ), + PlotExample( + "Mesh3d", + "Plot a 3d mesh", + [ + :( + begin + # specify the vertices + x=[0, 1, 2, 0] + y=[0, 0, 1, 2] + z=[0, 2, 0, 1] + + # specify the triangles + # every column is one triangle, + # where the values denote the indices of the vertices of the triangle + i=[0, 0, 0, 1] + j=[1, 2, 3, 2] + k=[2, 3, 1, 3] + + # the four triangles gives above give a tetrahedron + mesh3d(x,y,z;connections=(i,j,k)) + end + ), + ], + ), PlotExample( "DataFrames", "Plot using DataFrame column symbols.",