Skip to content

Commit

Permalink
test(BSplines): add tests for derivatives
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutosh-b-b committed Oct 21, 2024
1 parent c23fb72 commit 7dcb6ff
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test/derivative_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,44 @@ end
:Uniform,
:Uniform],
name = "BSpline Approx (Uniform, Uniform)")

f3d(t) = [sin(t) cos(t);
0.0 cos(2t)]

t3d = 0.1:0.1:1.0 |> collect
u3d = cat(f3d.(t)...; dims = 3)
test_derivatives(BSplineInterpolation;
args = [u3d, t3d,
2,
:Uniform,
:Uniform],
name = "BSpline Interpolation (Uniform, Uniform): AbstractArray"
)

test_derivatives(BSplineInterpolation;
args = [u3d, t3d,
2,
:ArcLen,
:Average],
name = "BSpline Interpolation (Arclen, Average): AbstractArray"
)

test_derivatives(BSplineApprox;
args = [u3d, t3d,
3,
4,
:Uniform,
:Uniform],
name = "BSpline Approx (Uniform, Uniform)")

test_derivatives(BSplineApprox;
args = [u3d, t3d,
3,
4,
:ArcLen,
:Average],
name = "BSpline Approx (Arclen, Average): AbstractArray"
)
end

@testset "Cubic Hermite Spline" begin
Expand Down

0 comments on commit 7dcb6ff

Please sign in to comment.