Hi all,
Is there any way of plotting a mesh of quadrilaterals using mesh
or, alternatively, some way around using other functions?
Hi all,
Is there any way of plotting a mesh of quadrilaterals using mesh
or, alternatively, some way around using other functions?
You can define a mesh via quad faces. Those will be decomposed into triangle faces by normal_mesh
and Makie requires those in the end.
using GeometryBasics, GLMakie
points = [Point2f0(0, 0), Point2f0(1, 0), Point2f0(0, 1), Point2f0(1, 1)]
_faces = [QuadFace(1, 2, 4, 3)]
m = normal_mesh(points, _faces)
mesh(m)
Also take a look at MeshViz.jl if you are interested in mesh processing in general and other visualization options: https://github.com/JuliaGeometry/MeshViz.jl
Where are those .ply
files available?
And what about visualizing the edges with wireframe
? Thanks!
I think you have to do that manually with something like
ls = Point2f0[]
for f in _faces
push!(ls,
points[f[1]], points[f[2]],
points[f[2]], points[f[3]],
points[f[3]], points[f[4]],
points[f[4]], points[f[1]],
)
end
linesegments(ls)
They are available online, I just searched for mesh PLY download. Here are some examples: