|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
A Casteljau set of tables for some nsimplex.
nsimplex = 2=tri, 4=pent. 5=hex
alldepths from depth_elev_min to depth_elev_max are accomodated.
Note that the multiindices, Sabin net, etc are all 0 indexed,
like Shoemake, not like Loop & DeRose
Variables:
- int n_simplex;
-
the simplex of this set of tables
- int no_points[];
-
the number of points fro each depth
- int * look_shoe;
-
the shoemake look up table, to store multindexed info in 1D
and facilitate the castejau routine
- int * look_derose;
-
a lookup table used to save having to recompute the offsets when
converting the sabins to bezier control points
- int * indices[];
-
all the possible indices enumerated, size no_points(d,n)*(n+1)
for each depth.
- int * elevate[];
-
tables containing all the offsets necessary for depth elevation
- double matrix[];
-
M matrix; fixed size is a little wasteful.
Methods:
- t_casteljau(int n)
-
- ~t_casteljau()
-
the direct scheme uses these 2 functions
----------------------------------------
- void spatch_load_control(t_vector * bezcont,t_vector * sabin)
-
Given the control points in Sabin, this constructs the
sabin net p,q,v and then from these computes the bezier control points
which are returned in bezcont
- t_vector do_casteljau(t_vector * work,double * bary)
-
Given a working array containing the bezier control points,
a barycentric coord, using the internal lookup tables
output the point. The working array is overwritten.
matrix based schemes
--------------------
- void matrix_sab_bez(t_vector * bezcont,t_vector * sabin)
-
does the same as spatch_load_control using the matrix
- void matrix_uM(double * answer,double * bary)
-
does similar to do_casteljau, does dot product of u vector with matrix
returns uM ready to be dotted with a sabin vector
- void matrix_make()
-
make up the M matrix
- void spatch_load_contr_look()
-
build up the lookup table look_derose
- void enumerate_indices(int d)
-
use a local recursive function to enumerate the indices
|
Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|