ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/bezier2.cal
Revision: 1.1
Committed: Sat Feb 22 02:07:21 2003 UTC (21 years, 1 month ago) by greg
Branch: MAIN
CVS Tags: rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# Content
1 {
2 Bicubic Bezier Patch
3
4 02Mar90
5
6 Define Px(i,j), Py(i,j), Pz(i,j)
7 }
8
9 x(s,t) = bezier(P2x(s,1), P2x(s,2), P2x(s,3), P2x(s,4), t);
10 y(s,t) = bezier(P2y(s,1), P2y(s,2), P2y(s,3), P2y(s,4), t);
11 z(s,t) = bezier(P2z(s,1), P2z(s,2), P2z(s,3), P2z(s,4), t);
12
13 P2x(s,j) = bezier(Px(1,j), Px(2,j), Px(3,j), Px(4,j), s);
14 P2y(s,j) = bezier(Py(1,j), Py(2,j), Py(3,j), Py(4,j), s);
15 P2z(s,j) = bezier(Pz(1,j), Pz(2,j), Pz(3,j), Pz(4,j), s);
16
17 bezier(p1, p2, p3, p4, t) = p1 * (1+t*(-3+t*(3-t))) +
18 p2 * 3*t*(1+t*(-2+t)) +
19 p3 * 3*t*t*(1-t) +
20 p4 * t*t*t ;