ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/cubic.cal
Revision: 1.2
Committed: Wed Nov 21 18:10:45 2018 UTC (5 years, 5 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4, rad5R3, HEAD
Changes since 1.1: +1 -0 lines
Log Message:
Added missing RCSid tag

File Contents

# Content
1 { RCSid $Id$ }
2 {
3 Cubic Basis Functions
4 }
5
6 bezier(p1, p2, p3, p4, t) = p1 * (1+t*(-3+t*(3-t))) +
7 p2 * 3*t*(1+t*(-2+t)) +
8 p3 * 3*t*t*(1-t) +
9 p4 * t*t*t ;
10
11 hermite(p0, p1, r0, r1, t) = p0 * ((2*t-3)*t*t+1) +
12 p1 * (-2*t+3)*t*t +
13 r0 * (((t-2)*t+1)*t) +
14 r1 * ((t-1)*t*t);
15
16 bspline(pp, p0, p1, pn, t) = pp * (1/6+t*(-1/2+t*(1/2-1/6*t))) +
17 p0 * (2/3+t*t*(-1+1/2*t)) +
18 p1 * (1/6+t*(1/2+t*(1/2-1/2*t))) +
19 pn * (1/6*t*t*t) ;