diff --git a/README.md b/README.md index 4da957ae..2a00f413 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,9 @@ plot(M; controlpoints=(markersize=2,)) ![](docs/src/img/rational_bspline_surface_plotly.png) ### Refinement -#### h-refinement +#### h-refinement (knot insertion) +Insert additional knots to knot vectors without changing the shape. + ```julia k₊ = (KnotVector([3.1, 3.2, 3.3]), KnotVector([0.5, 0.8, 0.9])) # additional knot vectors M_h = refinement(M, k₊) # refinement of B-spline manifold @@ -160,9 +162,9 @@ plot(M_h; controlpoints=(markersize=2,)) ``` ![](docs/src/img/rational_bspline_surface_href_plotly.png) -Note that this shape and the last shape are equivalent. +#### p-refinement (degree elevation) +Increase the polynomial degrees of B-spline manifold without changing the shape. -#### p-refinement ```julia p₊ = (Val(1), Val(2)) # additional degrees M_p = refinement(M, p₊) # refinement of B-spline manifold @@ -170,8 +172,6 @@ plot(M_p; controlpoints=(markersize=2,)) ``` ![](docs/src/img/rational_bspline_surface_pref_plotly.png) -Note that this shape and the last shape are equivalent. - ### Fitting B-spline manifold The next example shows the fitting for [the following graph on Desmos graphing calculator](https://www.desmos.com/calculator/2hm3b1fbdf)! diff --git a/docs/make.jl b/docs/make.jl index 319c21e0..29f320ca 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -6,6 +6,7 @@ using InteractiveUtils using Plots using Random +ENV["GKSwstype"] = "100" gr() plotly() Random.seed!(42) @@ -26,7 +27,7 @@ function generate_indexmd_from_readmemd() text_index = replace(text_index, r"\$\$((.|\n)*?)\$\$" => s"```math\1```") text_index = replace(text_index, "(https://hyrodium.github.io/BasicBSpline.jl/dev/math/bsplinebasis/#Differentiability-and-knot-duplications)" => "(@ref differentiability-and-knot-duplications)") text_index = replace(text_index, r"https://github.com/hyrodium/BasicBSpline\.jl/assets/.*" => "![](math/differentiability.mp4)") - text_index = replace(text_index, "```julia\njulia>" => "```julia-repl\njulia>") + text_index = replace(text_index, "```julia\njulia>" => "```jldoctest\njulia>") text_index = replace(text_index, "```julia\n" => "```@example readme\n") text_index = replace(text_index, r"```\n!\[\]\(docs/src/img/(.*?)plotly\.png\)" => s"savefig(\"readme-\1plotly.html\") # hide\nnothing # hide\n```\n```@raw html\n\n```") text_index = replace(text_index, r"```\n!\[\]\(docs/src/img/(.*?)\.png\)" => s"savefig(\"readme-\1.png\") # hide\nnothing # hide\n```\n![](readme-\1.png)") diff --git a/docs/src/math/refinement.md b/docs/src/math/refinement.md index ef555e01..2300d59a 100644 --- a/docs/src/math/refinement.md +++ b/docs/src/math/refinement.md @@ -27,8 +27,8 @@ nothing # hide ![](refinement_2dim_original.png) -### h-refinement -Insert additional knots to knot vector without changing the shape. +### h-refinement (knot insertion) +Insert additional knots to knot vectors without changing the shape. ```@repl math_refinement k₊ = (KnotVector([3.3,4.2]), KnotVector([3.8,3.2,5.3])) # additional knot vectors @@ -40,8 +40,8 @@ nothing # hide ![](refinement_2dim_h.png) -### p-refinement -Increase the polynomial degree of B-spline manifold without changing the shape. +### p-refinement (degree elevation) +Increase the polynomial degrees of B-spline manifold without changing the shape. ```@repl math_refinement p₊ = (Val(1), Val(2)) # additional degrees