elevate_degree_A_5_9 Subroutine
- Seyed Ali Ghasemi
- BSD 3-Clause
- 16 statements
public pure subroutine elevate_degree_A_5_9(t, knot, degree, Xcw, nc_new, knot_new, Xcw_new, Tmap, success)
Elevate a spline degree while preserving bounded or periodic topology.
Homogeneous coordinates must be supplied for rational geometry. A
representation satisfying periodic_topology is elevated cyclically:
each seam and interior multiplicity increases by t, the knot extension
remains periodic, and the final elevated-degree control rows repeat the
first rows. Other valid inputs are elevated on their active interval; a
non-clamped bounded representation is first restricted to an equivalent
open-clamped representation.
Tmap, when requested, satisfies Xcw_new=matmul(Tmap,Xcw) for either
topology. t=0 is the exact identity. Invalid input returns empty arrays
and success=.false. when present.
References:
- H. Prautzsch, "Degree Elevation of B-Spline Curves," Computer Aided Geometric Design 1 (1984), 193--198. doi:10.1016/0167-8396(84)90031-1.
- L. Piegl and W. Tiller, The NURBS Book, 2nd ed., Springer, 1997, Algorithm A5.9.
Arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | t |
Nonnegative number of degree elevations. |
||
| real(kind=rk), | intent(in), | contiguous | :: | knot(:) |
Original valid knot vector. |
|
| integer, | intent(in) | :: | degree |
Original polynomial degree. |
||
| real(kind=rk), | intent(in), | contiguous | :: | Xcw(:,:) |
Original control variables, one point per row. |
|
| integer, | intent(out) | :: | nc_new |
New control-point count. |
||
| real(kind=rk), | intent(out), | allocatable | :: | knot_new(:) |
Elevated knot vector. |
|
| real(kind=rk), | intent(out), | allocatable | :: | Xcw_new(:,:) |
Elevated control variables. |
|
| real(kind=rk), | intent(out), | optional, | allocatable | :: | Tmap(:,:) |
Optional transformation satisfying |
| logical, | intent(out), | optional | :: | success |
Optional operation status. |