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/anglst.cpp $
5 $LastChangedRevision: 85 $
6 $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
8 ***********************************************************
10 anglst.cpp,v 1.3 2008/09/25 13:17:44 jklukowska Exp
23 anglst_class::~anglst_class()
35 void anglst_class::Init(INTEGER prjnum)
37 bth = new REAL[prjnum];
38 bsin = new REAL[prjnum];
39 bcos = new REAL[prjnum];
42 void anglst_class::InitDiv(REAL* pang, INTEGER prjnum)
48 dtor = Consts.pi / (REAL) 180.0;
50 for (np = 0; np < prjnum; np++)
52 theta = pang[np] * dtor;
54 bsin[np] = (REAL) sin(theta);
55 bcos[np] = (REAL) cos(theta);
62 C.... ESTABLISH SIN AND COSINE TABLES NEEDED FOR DIVERGENT GEOMETRY
63 C.... FOR USE BY POSIT.
64 C.... CALLED BY RDPROJ, EXALG, AND EVAL.
67 void anglst_class::genphi()
72 nmax = (GeoPar.nrays - 1) / 2;
73 sphi = new REAL[nmax];
74 cphi = new REAL[nmax];
76 for (int nr = 0; nr < nmax; nr++)
79 th = GeoPar.pinc / GeoPar.stod * (nr + 1);
81 th = (REAL) atan2((nr + 1) * GeoPar.pinc, GeoPar.stod);
83 sphi[nr] = (REAL) sin(th);
84 cphi[nr] = (REAL) cos(th);