math / data /lean /OAI /Geometry /CylinderCovering /Convexity /NormalFrameDefinitions.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
764 Bytes
import Mathlib
namespace OAI
noncomputable section
open scoped InnerProductSpace
namespace CylinderNormalFrame
abbrev Space := EuclideanSpace ℝ (Fin 3)
abbrev BarycentricSpace := EuclideanSpace ℝ (Fin 4)
def normal (i : Fin 4) : Space :=
(1 / Real.sqrt 3) β€’ ![(!β‚‚[0, Real.sqrt 2, -1] : Space),
!β‚‚[0, -Real.sqrt 2, -1],
!β‚‚[Real.sqrt 2, 0, 1],
!β‚‚[-Real.sqrt 2, 0, 1]] i
def frameCost (u : Space) : ℝ :=
Real.sqrt 3 / 2 * βˆ‘ i : Fin 4, |inner ℝ u (normal i)|
def barycentricCost (u : BarycentricSpace) : ℝ :=
(1 / 2 : ℝ) * βˆ‘ i : Fin 4, |u i|
def edgeDirection : Space := !β‚‚[1, 0, 0]
def barycentricEdge : BarycentricSpace :=
!β‚‚[1 / Real.sqrt 2, -(1 / Real.sqrt 2), 0, 0]
end CylinderNormalFrame
end
end OAI