BspCrvKnotInsert
Section: C Library Functions (3)
Updated: IRIT Version 6.0
Index
Return to Main Contents
NAME
BspCrvKnotInsert()
SYNOPSIS
cagd_lib/bspboehm.c:60
CagdCrvStruct *BspCrvKnotInsert(CagdCrvStruct *Crv, CagdRType t)
DESCRIPTION
Returns a new curve refined at t (t is inserted as a new knot in Crv).
If however the multiplicity of t in the current knot vector is equal
(or greater!?) to the degree or t is not in the curve's parametric domain,
no new knot is insert and NULL is returned instead.
Control mesh is updated as follows (P is old ctl polygon, Q is new):
Let Index be the last knot in old knot vector less than t and
let j be j = Index - order + 1. Also let k be the curve order. Then,
Case 1: Q(i) = P(i), i <= j
t - t(i) t(i+k-1) - t
case 2: Q(i) = --------------- P(i) + --------------- P(i-1), j<i<=Index
t(i+k-1) - t(i) t(i+k-1) - t(i)
case 3: Q(i) = P(i-1), Index < i
Note: Altough works, this is not the optimal way to insert many knot!
See also the BspKnotEvalAlpha set of routines.
For more see:
"Recursive proof of Boehm's knot insertion technique", by Phillip J Barry
Ronald N Goldman, CAD, Volume 20 number 4 1988, pp 181-182.
Which also references the original 1980 paper by Boehm.
PARAMETERS:
Crv: To refine by adding a new knot with value equal to t. If Crv
is a periodic curve, it is first unwrapped to a float end
condition curve.
t: New knot to insert into Crv.
FUNCTION RETURN VALUE
CagdCrvStruct *: The refined curve.
SEE ALSO
BspCrvKnotInsertNSame,
BspCrvKnotInsertNDiff,
BspSrfKnotInsert,
BspKnotEvalAlphaCoef,
ORIGIN
(C) Copyright 1989/90-95 Gershon Elber, Technion, IIT
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- PARAMETERS:
-
- FUNCTION RETURN VALUE
-
- SEE ALSO
-
- ORIGIN
-
This document was created by
man2html,
using the manual pages.
Time: 07:28:04 GMT, July 20, 2024