#include #include #include #include #include "mucal.h" #include "panel.h" /* ******************************************************************** */ /* Sequential numbering of individual facets in the lens. This version for three facet layers * The first three parameters in the call are 'ring_no' (the current hexagon ring number) layer number and facet sequential number. * The routine returns the initial facet number for the subsequent hexagonal facet ring. * Niels Lund April 2016 - December 2018 panel_new[0] = Foc_len; panel_new[1] = lens_diam; panel_new[2] = facet_diam; panel_new[3] = x_focusU; panel_new[4] = y_focusU; panel_new[5] = x_focusD; panel_new[6] = y_focusD; panel_new[7] = cameraH; panel_new[8] = lensDiameter; */ int hexring( int ring_no, int layer_no, int facet_no, float panel_new[], /* structure specifying the lens and facet geometry */ facet *FACET) { int i, j, k=0, iadd; static int last_facet_no=0; iadd = layer_no * N_CryPos; for (i=0; i