JuliaGeometry / JuliaGeometry/GeometryBasics.jl

Meshing a single triangle sometimes returns an empty mesh

Open
#158 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
215
Forks
64
Avg merge
3d 18h
Merged PRs (30d)
2

Description

The doc page at https://juliageometry.github.io/GeometryBasics.jl/dev/meshes/ is empty, so I'm not sure what I'm expected to do, but creating a mesh out of a single triangle sometimes works:

julia> normal_mesh(Triangle(Point(0,0,0.0),Point(1.0,0,0),Point(0,1.0,0)))
Mesh{3, Float32, Triangle}:
 Triangle(Float32[0.0, 1.0, 0.0], Float32[0.0, 0.0, 0.0], Float32[1.0, 0.0, 0.0])

and sometimes doesn't:

julia> ϕ = (sqrt(5)+1)/2
1.618033988749895
julia> p,q,r = Point(ϕ,0,+1),Point(1,ϕ,0),Point(ϕ,0,-1)
([1.618033988749895, 0.0, 1.0], [1.0, 1.618033988749895, 0.0], [1.618033988749895, 0.0, -1.0])
julia> normal_mesh(Triangle(p,q,r))
Mesh{3, Float64, Triangle}

I was trying to follow the MeshCat.jl's tutorial, and I got this issue while trying to draw a flat triangle.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two examples in a Julia REPL, starting with the normal_mesh entry point and the golden-ratio triangle shown in the report. Trace why that triangle produces an empty Mesh, then verify that single-triangle inputs return the expected mesh rather than an empty result.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.