Initial snark14m import
[snark14.git] / src / snark / blob_table.cpp
1 /*
2  ***********************************************************
3  $SNARK_Header: S N A R K  1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4  $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/blob_table.cpp $
5  $LastChangedRevision: 85 $
6  $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
7  $Author: agulati $
8  ***********************************************************
9  */
10
11 #include <cstdio>
12 #include <cmath>
13
14 #include "blkdta.h"
15 #include "blob.h"
16 #include "geom.h"
17 #include "uiod.h"
18
19 void Blob_class::table()
20 {
21         INTEGER i;
22         REAL dist = 0.0;
23
24         REAL blobisamp;
25
26         Blob.vtable = new REAL[samp];
27         Blob.ltable = new REAL[samp + 1]; //for convinience in bwray.cpp when nint=samp, by wei, 1/2005
28
29         blobisamp = (REAL) 1.0 / samp * Blob.support;
30
31         for (i = 0; i < samp; i++)
32         {
33                 Blob.vtable[i] = Blob.radial(dist);
34                 Blob.ltable[i] = Blob.lintegral(dist);
35
36                 dist += blobisamp;
37         }
38
39         Blob.ltable[samp] = Blob.ltable[samp - 1]; //the same value for nint=samp and nint=samp-1, by wei, 1/2005
40
41 }
42