Point Cloud Differential Geometry
Types
SeqSpace.DifferentialGeometry.Manifold
— Typestruct Manifold{T <: Real}
mesh :: Mesh{T}
surf :: Surface{T}
end
Store the representation of a differential geometry object. mesh
is the empirical point cloud. surf
is the estimated differentiable surface.
SeqSpace.DifferentialGeometry.Mesh
— Typestruct Mesh{T <: Real}
r :: Array{T, 2}
vₙ :: Array{T, 2}
tri :: Array{Int, 2}
end
Store a 2 dimensional triangular mesh, embedded into arbitrary dimensions. r
and vₙ
denote vertex positions and normals respectively. tri
denotes (non-oriented) triangular faces.
SeqSpace.DifferentialGeometry.Surface
— Typestruct Surface{T <: Real}
Θ :: Array{T, 2}
x :: Array{T}
L :: T
Λ :: Array{Polynomial{T}}
∂Λ :: Array{Polynomial{T}}
end
Store a representation of a 2D surface embedded into higher dimensional Euclidean space. Fits the surface by:
- Partition the x axis so that each resultant interval has, on average, 20 points.
- Fit points within each partition to a 2D ellipse.
- Fit a polynomial function to each elliptical parameter over all partitions.
- Use polynomials to estimate tangent vectors.
Θ
denotes the elliptical parameters fit per partition. x
denotes the input data. L
denotes the length along the x axis. Λ
denotes the polynomials for each elliptical parameter. ∂Λ
denotes the derivative of polynomials for each elliptical parameter.
Functions
SeqSpace.DifferentialGeometry.basis
— Methodfunction basis(s::Surface, r)
Compute the tangent vectors $\hat{\bm{e}}_\phi, \hat{\bm{e}}_x$ associated to each point within r
. Assumes all points within r
are distributed over the surface. Assumes r
is sized $N \times 3$.
SeqSpace.DifferentialGeometry.ellipse
— Methodellipse(r)
Fit an ellipse to 2D point cloud r
. r
is assumed to be sized $N \times 2$.
SeqSpace.DifferentialGeometry.interpolate
— Methodfunction interpolate(M, ϕ, r)
Interpolate the tensor field ϕ
, defined at points r
onto the vertices of manifold M
. Interpolation is computed by finding the containing triangle within the mesh of M
for each point r
. Linear interpolation is performed per face.
SeqSpace.DifferentialGeometry.makefield
— MethodSeqSpace.DifferentialGeometry.mesh
— Functionmesh(io::IO, type::Symbol=:obj)
Load a Mesh
object from stream io
formatted with type
. As of now, only .obj
files are supported.
SeqSpace.DifferentialGeometry.order
— Methodfunction order(tri, r)
Reorder the triangulation so that all labels are counterclockwise.
SeqSpace.DifferentialGeometry.pullback
— Methodfunction pullback(ℳ::Manifold)
Returns the 2D cylindrical projection of the mesh, as estimated by the internal surface.
SeqSpace.DifferentialGeometry.pullback
— Methodfunction pullback(s::Surface, r)
Transform Euclidean point cloud r
into a 2D cylindrical projection defined by s
. Cylindrical coordinates are [x,φ]. Assumes all points within r
are distributed over the surface. Assumes r
is sized $N \times 3$.
SeqSpace.DifferentialGeometry.rescale
— Methodrescale(x)
Rescale array x
to run between $[0,1]$.
SeqSpace.DifferentialGeometry.scalar
— Methodscalar(M::Manifold, ϕ, field::Symbol)
Return a scalar field ϕ
interpolated onto either the embedded space of manifold M
or the pullback. If field
is :ℝ² the pullback is computed. If field
is :ℝ³ the embedding space is returned.
SeqSpace.DifferentialGeometry.triangulation
— Methodfunction triangulation(r₀, rᵢ)
Return the triangle containing each point given in rᵢ
. The triangulation used is delaunay triangulation defined by point cloud r₀
.
SeqSpace.DifferentialGeometry.vector
— Methodscalar(M::Manifold, ϕ, field::Symbol)
Return a vector field field ϕ
interpolated onto either the embedded space of manifold M
or the pullback. If field
is :ℝ² the pullback is computed. Only the tangent space component is kept. If field
is :ℝ³ the embedding space is returned.