ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/bezier2.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
Error occurred while calculating annotation data.
Log Message:
Added missing RCSid tag

File Contents

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