Integrating with existing code from Instant Field-Aligned Meshes.
Project URL: Instant Field-Aligned Meshes
The original formula:
The original source code:
The modified source code:
I❤️LA source code:
ε = 10^(-4)
`λᵢ` = (2⟨`nᵢ`+⟨`nᵢ`,`nⱼ`⟩`nⱼ`, `vⱼ`-`vᵢ`⟩)/(1-⟨`nᵢ`, `nⱼ`⟩²+ε)
`λⱼ` = (2⟨`nⱼ`+⟨`nⱼ`,`nᵢ`⟩`nᵢ`, `vᵢ`-`vⱼ`⟩)/(1-⟨`nⱼ`, `nᵢ`⟩²+ε)
`qᵢⱼ` = 1/2(`vᵢ`+`vⱼ`)-1/4(`λᵢ``nᵢ`+`λⱼ``nⱼ`)
where
`vᵢ` ∈ ℝ^3
`nᵢ` ∈ ℝ^3
`vⱼ` ∈ ℝ^3
`nⱼ` ∈ ℝ^3
I❤️LA LaTeX output: