From fd25476ff71f2b4c76d4d3ffaa67220dc6d1ff08 Mon Sep 17 00:00:00 2001 From: Michael Ingold Date: Wed, 25 Sep 2024 12:38:34 -0400 Subject: [PATCH 1/5] Add why-special note for BezierCurve --- src/specializations/BezierCurve.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/specializations/BezierCurve.jl b/src/specializations/BezierCurve.jl index 426b5f50..cd75d108 100644 --- a/src/specializations/BezierCurve.jl +++ b/src/specializations/BezierCurve.jl @@ -1,5 +1,12 @@ ################################################################################ # Specialized Methods for BezierCurve +# +# Why Specialized? +# The parametric function in Meshes.jl for BezierCurve accepts an argument +# of type Meshes.BezierEvalMethod, in which the method for generating +# parametric points along the curve is specified. These specialized methods +# are essentially identical to the generic ones, except that they provide a +# keyword argument and pass through the specified algorithm choice. ################################################################################ function lineintegral( From 0470aec4ee1963057a2be4973e87ba10883497e8 Mon Sep 17 00:00:00 2001 From: Michael Ingold Date: Wed, 25 Sep 2024 12:47:27 -0400 Subject: [PATCH 2/5] Add why-special notes for conics --- src/specializations/ConeSurface.jl | 6 ++++++ src/specializations/CylinderSurface.jl | 6 ++++++ src/specializations/FrustumSurface.jl | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/src/specializations/ConeSurface.jl b/src/specializations/ConeSurface.jl index 78cbe639..32154d30 100644 --- a/src/specializations/ConeSurface.jl +++ b/src/specializations/ConeSurface.jl @@ -1,5 +1,11 @@ ################################################################################ # Specialized Methods for ConeSurface +# +# Why Specialized? +# The parametric function that Meshes.jl currently implements for ConeSurface +# only parameterizes the rounded walls of the cone, but this Geometry surface is +# defined as including the circular base surface as well. These methods simply +# integrate both the base and walls and return the sum of the two integrals. ################################################################################ function integral( diff --git a/src/specializations/CylinderSurface.jl b/src/specializations/CylinderSurface.jl index 859b4173..99a6fe8d 100644 --- a/src/specializations/CylinderSurface.jl +++ b/src/specializations/CylinderSurface.jl @@ -1,5 +1,11 @@ ################################################################################ # Specialized Methods for CylinderSurface +# +# Why Specialized? +# The parametric function that Meshes.jl currently implements for CylinderSurface +# only parameterizes the rounded walls, but this Geometry surface is defined as +# including the top and bottom circular base surfaces as well. These methods +# simply integrate the base and walls and return the sum of the three integrals. ################################################################################ function integral( diff --git a/src/specializations/FrustumSurface.jl b/src/specializations/FrustumSurface.jl index 101b9fce..b12a7b75 100644 --- a/src/specializations/FrustumSurface.jl +++ b/src/specializations/FrustumSurface.jl @@ -1,5 +1,11 @@ ################################################################################ # Specialized Methods for FrustumSurface +# +# Why Specialized? +# The parametric function that Meshes.jl currently implements for FrustumSurface +# only parameterizes the rounded walls, but this Geometry surface is defined as +# including the truncated top and bottom surfaces as well. These methods simply +# integrate both the walls and the ends and return the sum of the these integrals. ################################################################################ function integral( From 35b2f6de842a86e7fe627aaa1fee8cd291797487 Mon Sep 17 00:00:00 2001 From: Michael Ingold Date: Wed, 25 Sep 2024 12:53:29 -0400 Subject: [PATCH 3/5] Add why-special notes for geometries with infinite extent --- src/specializations/Line.jl | 5 +++++ src/specializations/Plane.jl | 6 ++++++ src/specializations/Ray.jl | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/src/specializations/Line.jl b/src/specializations/Line.jl index b22f8fa5..164dbb0a 100644 --- a/src/specializations/Line.jl +++ b/src/specializations/Line.jl @@ -1,5 +1,10 @@ ################################################################################ # Specialized Methods for Line +# +# Why Specialized? +# The Line geometry is a special case, representing a line of infinite length +# that passes through two points. This requires another domain transformation +# mapping from the typical parametric region [0,1] to an infinite one (-∞,∞). ################################################################################ function integral( diff --git a/src/specializations/Plane.jl b/src/specializations/Plane.jl index d78f1159..705dc3ec 100644 --- a/src/specializations/Plane.jl +++ b/src/specializations/Plane.jl @@ -1,5 +1,11 @@ ################################################################################ # Specialized Methods for Plane +# +# Why Specialized? +# The Plane geometry is a special case, representing a planar surface with +# infinite extent along two basis vectors. This requires a pair of domain +# transformations mapping from the typical parametric region [0,1]² to an +# infinite one (-∞,∞)². ################################################################################ function integral( diff --git a/src/specializations/Ray.jl b/src/specializations/Ray.jl index dee13e0e..464bc7af 100644 --- a/src/specializations/Ray.jl +++ b/src/specializations/Ray.jl @@ -1,5 +1,11 @@ ################################################################################ # Specialized Methods for Ray +# +# Why Specialized? +# The Ray geometry is a special case, representing a ray, originating at a point +# and extending an infinite length in a particular direction. This requires +# a domain transformation mapping from the typical parametric region [0,1] to +# an infinite one (-∞,∞). ################################################################################ function integral( From 3c7d33b9e834e9d2ab8b65c87a67a7f613774bd5 Mon Sep 17 00:00:00 2001 From: Michael Ingold Date: Wed, 25 Sep 2024 13:20:39 -0400 Subject: [PATCH 4/5] Add why-special notes for Ring and Rope --- src/specializations/Ring.jl | 6 ++++++ src/specializations/Rope.jl | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/specializations/Ring.jl b/src/specializations/Ring.jl index 87c08407..3b498495 100644 --- a/src/specializations/Ring.jl +++ b/src/specializations/Ring.jl @@ -1,5 +1,11 @@ ################################################################################ # Specialized Methods for Ring +# +# Why Specialized? +# The Ring geometry defines a polytope whose length spans segments between +# consecutive points that form a closed path. Meshes.jl does not define a +# parametric function for Ring's, but they can be decomposed into their +# constituent Segment's, integrated separately, and then summed. ################################################################################ function integral( diff --git a/src/specializations/Rope.jl b/src/specializations/Rope.jl index d1fe218e..369eaf8d 100644 --- a/src/specializations/Rope.jl +++ b/src/specializations/Rope.jl @@ -1,5 +1,11 @@ ################################################################################ # Specialized Methods for Rope +# +# Why Specialized? +# The Rope geometry defines a polytope whose length spans segments between +# consecutive points. Meshes.jl does not define a parametric function for +# Rope's, but they can be decomposed into their constituent Segment's, +# integrated separately, and then summed. ################################################################################ function integral( From 4e72ccb40c3de7a17d588f78b38ea2b5304b584d Mon Sep 17 00:00:00 2001 From: Michael Ingold Date: Wed, 25 Sep 2024 13:28:15 -0400 Subject: [PATCH 5/5] Add why-special notes for simplex types --- src/specializations/Tetrahedron.jl | 7 +++++++ src/specializations/Triangle.jl | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/specializations/Tetrahedron.jl b/src/specializations/Tetrahedron.jl index 9f74269e..70c0c677 100644 --- a/src/specializations/Tetrahedron.jl +++ b/src/specializations/Tetrahedron.jl @@ -1,5 +1,12 @@ ################################################################################ # Specialized Methods for Tetrahedron +# +# Why Specialized? +# The Tetrahedron geometry is a volumetric simplex whose parametric function +# in Meshes.jl uses barycentric coordinates on a domain {u,v,w} with coordinates +# that are non-negative and bound by the surface $u + v + w ≤ 1$. This requires +# a multi-step domain transformation whose derivation is detailed in the package +# documentation. ################################################################################ function integral( diff --git a/src/specializations/Triangle.jl b/src/specializations/Triangle.jl index 2406cc5e..bd01ac0e 100644 --- a/src/specializations/Triangle.jl +++ b/src/specializations/Triangle.jl @@ -1,5 +1,12 @@ ################################################################################ # Specialized Methods for Triangle +# +# Why Specialized? +# The Triangle geometry is a surface simplex whose parametric function in +# Meshes.jl uses barycentric coordinates on a domain {u,v} with coordinates +# that are non-negative and bound by the surface $u + v ≤ 1$. This requires a +# multi-step domain transformation whose derivation is detailed in the package +# documentation. ################################################################################ """