ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/genrev.c
(Generate patch)

Comparing ray/src/gen/genrev.c (file contents):
Revision 1.4 by greg, Fri Mar 2 17:24:07 1990 UTC vs.
Revision 1.5 by greg, Wed Mar 7 11:14:40 1990 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1989 Regents of the University of California */
2
1   #ifndef lint
2   static char SCCSid[] = "$SunId$ LBL";
3   #endif
4  
5 + /* Copyright (c) 1989 Regents of the University of California */
6 +
7   /*
8   *  genrev.c - program to generate functions of rotation about z
9   *
# Line 28 | Line 28 | static char SCCSid[] = "$SunId$ LBL";
28   #define  UP             04
29   #define  DOWN           010
30  
31 < double  funvalue(), l_hermite(), l_bezier(), argument();
31 > double  funvalue(), l_hermite(), l_bezier(), l_bspline(), argument();
32  
33  
34   main(argc, argv)
# Line 46 | Line 46 | char  *argv[];
46          varset("PI", PI);
47          funset("hermite", 5, l_hermite);
48          funset("bezier", 5, l_bezier);
49 +        funset("bspline", 5, l_bspline);
50  
51          if (argc < 6)
52                  goto userror;
# Line 224 | Line 225 | l_bezier()
225                  argument(2) * 3.*t*(1.+t*(-2.+t)) +
226                  argument(3) * 3.*t*t*(1.-t) +
227                  argument(4) * t*t*t );
228 + }
229 +
230 +
231 + double
232 + l_bspline()
233 + {
234 +        double  t;
235 +
236 +        t = argument(5);
237 +        return( argument(1) * (1./6.+t*(-1./2.+t*(1./2.-1./6.*t))) +
238 +                argument(2) * (2./3.+t*t*(-1.+1./2.*t)) +
239 +                argument(3) * (1./6.+t*(1./2.+t*(1./2.-1./2.*t))) +
240 +                argument(4) * (1./6.*t*t*t) );
241   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines