File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed
Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 5050# Parametric
5151# ###############################################################################
5252
53+ # Wrap (::BezierCurve)(t, ::BezierEvalMethod) into f(t) by embedding second argument
5354function _parametric (curve:: Meshes.BezierCurve , t, alg:: Meshes.BezierEvalMethod )
5455 return curve (t, alg)
5556end
Original file line number Diff line number Diff line change @@ -13,16 +13,18 @@ function integral(
1313 rule:: IntegrationRule ;
1414 kwargs...
1515)
16+ # Generate a _ParametricGeometry whose parametric function spans the domain [0, 1]
1617 paramfunction (t) = _parametric (line, t)
17- param_line = _ParametricGeometry (paramfunction, 1 )
18+
19+ # Integrate the _ParametricGeometry using the standard methods
1820 return _integral (f, param_line, rule; kwargs... )
1921end
2022
2123# ###############################################################################
2224# Parametric
2325# ###############################################################################
2426
25- # Map [0, 1] ↦ (-∞, ∞)
27+ # Map argument domain from [0, 1] to (-∞, ∞) for (::Line)(t )
2628function _parametric (line:: Meshes.Line , t)
2729 # [-1, 1] ↦ (-∞, ∞)
2830 f1 (t) = t / (1 - t^ 2 )
Original file line number Diff line number Diff line change @@ -14,19 +14,24 @@ function integral(
1414 rule:: IntegrationRule ;
1515 kwargs...
1616)
17+ # Generate a _ParametricGeometry whose parametric function spans the domain [0, 1]²
1718 paramfunction (t1, t2) = _parametric (plane, t1, t2)
18- param_plane = _ParametricGeometry (paramfunction, 2 )
19+
20+ # Integrate the _ParametricGeometry using the standard methods
1921 return _integral (f, param_plane, rule; kwargs... )
2022end
2123
2224# ###########################################################################################
2325# Parametric
2426# ###########################################################################################
2527
26- # Map [0, 1]² ↦ (-∞, ∞)²
28+ # Map argument domain from [0, 1]² to (-∞, ∞)² for (::Plane)(t1, t2)
2729function _parametric (plane:: Meshes.Plane , t1, t2)
30+ # [-1, 1] ↦ (-∞, ∞)
2831 f1 (t) = t / (1 - t^ 2 )
32+ # [0, 1] ↦ [-1, 1]
2933 f2 (t) = 2 t - 1
34+ # Compose the two transforms
3035 f = f1 ∘ f2
3136 return plane (f (t1), f (t2))
3237end
Original file line number Diff line number Diff line change @@ -14,16 +14,18 @@ function integral(
1414 rule:: IntegrationRule ;
1515 kwargs...
1616)
17+ # Generate a _ParametricGeometry whose parametric function spans the domain [0, 1]
1718 paramfunction (t) = _parametric (ray, t)
18- param_ray = _ParametricGeometry (paramfunction, 1 )
19+
20+ # Integrate the _ParametricGeometry using the standard methods
1921 return _integral (f, param_ray, rule; kwargs... )
2022end
2123
2224# ###########################################################################################
2325# Parametric
2426# ###########################################################################################
2527
26- # Map [0, 1] ↦ [0, ∞)
28+ # Map argument domain from [0, 1] to [0, ∞) for (::Ray)(t )
2729function _parametric (ray:: Meshes.Ray , t)
2830 f (t) = t / (1 - t^ 2 )
2931 return ray (f (t))
You can’t perform that action at this time.
0 commit comments