Skip to content

Commit

Permalink
Document algorithm for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeingold committed Dec 27, 2024
1 parent 3061dba commit 6fd00b7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/specializations/Tetrahedron.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,16 @@ function _parametric(tetrahedron::Meshes.Tetrahedron)
throw(DomainError((t₁, t₂, t₃), msg))
end

# Take a triangular cross-section at t3
"""
# Algorithm:
- Form a barycentric tetrahedron bounded by the points [0, 0, 0], [1, 0, 0],
[0, 1, 0], and [0, 0, 1].
- Use t₃ to take a triangular cross-section of the tetrahedron at points
[t₃, 0, 0], [0, t₃, 0], and [0, 0, t₃].
- Use t₂ to take a line segment cross-section of the triangle between
points [t₂t₃, 0, t₃ - t₂t₃] and [0, t₂t₃, t₃ - t₂t₃].
- Use t₁ to select a point along this line segment, i.e. ā + t₁(b̄ - ā).
"""
u₁ = (t₂ * t₃) - (t₁ * t₂ * t₃)
u₂ = t₁ * t₂ * t₃
u₃ = t₃ - (t₂ * t₃)
Expand Down

0 comments on commit 6fd00b7

Please sign in to comment.