00001 #include "sdyn3.h"
00002 #include "xstarplot.h"
00003 #include "dyn_util.h"
00004
00005
00006
00007
00008
00009 unsigned long win, dia, instr, colwin;
00010 unsigned long c_energy[10], c_index[N_COLORS+1];
00011 int init_status = 0;
00012
00013
00014
00015
00016 float xmin, xmax, ymin, ymax, base_point_size, lmax3d, origin[3];
00017
00018 int win_size;
00019 int point_scale_mode = 0;
00020 int kx = 1, ky = 2, kproj = 3;
00021 int origin_star = -1;
00022 int nodes = 0, links = 0, root = 0;
00023 float theta = 0.33, costheta = cos(0.33), sintheta = sin(0.33), dtheta = 0.03;
00024 float phi = 0.33, cosphi = cos(0.33), sinphi = sin(0.33);
00025 real local_offset[3];
00026 float delay_time;
00027 float r_factor = 1.0;
00028
00029 char graph3d = 1, track = 0, cenergy = 0;
00030
00031 char temp_buffer[255];
00032
00033
00034
00035 local void check_for_input(unsigned long win, sdyn3* b,
00036 bool b_flag, bool f_flag)
00037 {
00038 char key, string[20], shift, control;
00039
00040 while (lux_next_keypress(win, &key, string, &shift, &control))
00041 cerr << "key = " << key << endl;
00042 }
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 void xstarplot(sdyn3* b, float scale, int k, int d, float lmax,
00056 int point_mode, float rel_point_size,
00057 float D, int ce,
00058 bool b_flag, bool f_flag, bool t_flag,
00059 int init_flag)
00060 {
00061 r_factor = scale;
00062 int xorigin, yorigin;
00063
00064 initialize_graphics(r_factor, b_flag,
00065 win, instr, colwin,
00066 c_index, c_energy,
00067 win_size, xorigin, yorigin);
00068
00069 lux_clear_window(win);
00070 lux_update_fg(win);
00071
00072 while (1) check_for_input(win, b, b_flag, f_flag);
00073 }
00074
00075 main(int argc, char** argv)
00076 {
00077 sdyn3 *b;
00078
00079 int k = 3;
00080 int d = 2;
00081 float D = 0.0;
00082 int cenergy = 0;
00083 float lmax = -1.0;
00084 int point_mode = 0;
00085 float rel_point_size = -1.0;
00086 float scale = 1.0;
00087
00088 bool b_flag = TRUE;
00089 bool f_flag = TRUE;
00090 bool o_flag = FALSE;
00091 bool t_flag = FALSE;
00092
00093 xstarplot(b, scale, k, d, lmax,
00094 point_mode, rel_point_size, D, cenergy,
00095 b_flag, f_flag, t_flag, 0);
00096 }