Action:
|
Creates a quintic law given {a,b,f(a),f(b),f'(a),f'(b) f''(a) f''(b)}.
|
|
Filename:
|
kern/kern_scm/law_scm.cxx
|
|
APIs:
|
api_make_quintic
|
|
Syntax:
|
(law:quintic a b f-a f-b df-a df-b ddf-a ddf-b)
|
|
Arg Types:
|
a
|
real
|
|
b
|
real
|
|
f-a
|
real
|
|
f-b
|
real
|
|
df-a
|
real
|
|
df-b
|
real
|
|
ddf-a
|
real
|
|
ddf-b
|
real
|
|
Returns:
|
boolean
|
|
Description:
|
Produces a quintic polynomial with given boundary conditions for it, its first derivative, and its second derivative.
|
|
|
a and
b specifies the boundary values.
|
|
|
f-a and
f-b are the desired output of the law at
a and
b.
|
|
|
df-a and
df-b are the desired output of the first derivative at
a and
b.
|
|
|
ddf-a and
ddf-b are the desired output of the second derivative at
a and
b.
|
|
Example:
|
; law:quintic
|
|
; Create a law.
|
|
(define law1 (law:quintic 0 1 2 3 4 5 6 7))
|
|
;; law1
|
|
(law:eval law1 0)
|
|
;; 2
|
|
(law:eval law1 1)
|
|
;; 3
|
|
(define dlaw (law:derivative law1))
|
|
;; dlaw
|
|
(define ddlaw (law:derivative dlaw))
|
|
;; ddlaw
|
|
(law:eval dlaw 0)
|
|
;; 3.99999999999998
|
|
(law:eval dlaw 1)
|
|
;; 5.00000000000003
|
|
(law:eval ddlaw 0)
|
|
;; 6
|
|
(law:eval ddlaw 1)
|
|
;; 7
|