Points along an open curve, as separate segments.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | p(:,:) |
(3, n) points of the curve |
pure function open_segments(p) result(s) real(wp), intent(in) :: p(:,:) !! (3, n) points of the curve real(wp) :: s(3, 2 * (size(p, 2) - 1)) integer :: i do i = 1, size(p, 2) - 1 s(:, 2*i-1) = p(:, i) s(:, 2*i) = p(:, i + 1) end do end function open_segments