23 char des_bi_coupe_c[] =
"$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Graphics/des_bi_coupe.C,v 1.6 2014/10/13 08:53:21 j_novak Exp $" ;
63 #include "graphique.h" 65 #include "utilitaires.h" 71 void des_bi_coupe_y(
const Cmp& uu,
double y0,
int nzdes,
const char* title,
72 const Cmp* defsurf,
const Cmp* defsurf2,
double zoom,
73 bool draw_bound,
int ncour,
int nx,
int nz) {
75 const Map& mp = *(uu.get_mp()) ;
77 double a1 = mp.val_r(nzdes-1, 1., M_PI/2., 0.) ;
78 double a2 = mp.val_r(nzdes-1, 1., M_PI/2., M_PI/2.) ;
79 double a3 = mp.val_r(nzdes-1, 1., M_PI/2., M_PI) ;
80 double ray = mp.val_r(nzdes-1, 1., 0., 0.) ;
82 ray = ( a1 > ray ) ? a1 : ray ;
83 ray = ( a2 > ray ) ? a2 : ray ;
84 ray = ( a3 > ray ) ? a3 : ray ;
88 double x_min = mp.get_ori_x() - ray ;
89 double x_max = mp.get_ori_x() + ray ;
90 double z_min = mp.get_ori_z() - ray ;
91 double z_max = mp.get_ori_z() + ray ;
94 defsurf2, draw_bound, ncour, nx, nz) ;
100 void des_bi_coupe_y(
const Cmp& uu,
double y0,
double x_min,
double x_max,
101 double z_min,
double z_max,
const char* title,
const Cmp* defsurf,
102 const Cmp* defsurf2,
bool draw_bound,
int ncour,
int nx,
107 const Map& mp = *(uu.get_mp()) ;
112 float* uutab =
new float[nx*nz] ;
114 double hx = (x_max - x_min) /
double(nx-1) ;
115 double hza = (z_max - z_min) /
double(nz-1) ;
119 for (
int j=0; j<nz; j++) {
121 double z = z_min + hza * j ;
123 for (
int i=0; i<nx; i++) {
125 double x = x_min + hx * i ;
128 double r, theta, phi ;
129 mp.convert_absolute(x, y0, z, r, theta, phi) ;
131 uutab[nx*j+i] = float(uu.val_point(r, theta, phi)) ;
135 float xmin1 = float(x_min / km) ;
136 float xmax1 = float(x_max / km) ;
137 float zmin1 = float(z_min / km) ;
138 float zmax1 = float(z_max / km) ;
140 const char* nomx =
"x [km]" ;
141 const char* nomz =
"z [km]" ;
148 const char* device = 0x0 ;
149 int newgraph = ( (defsurf != 0x0) || draw_bound ) ? 1 : 3 ;
151 des_equipot(uutab, nx, nz, xmin1, xmax1, zmin1, zmax1, ncour, nomx, nomz,
152 title, device, newgraph) ;
157 if (defsurf != 0x0) {
159 assert(defsurf->get_mp() == uu.get_mp()) ;
161 newgraph = ( (defsurf2 != 0x0) || draw_bound ) ? 0 : 2 ;
167 if (defsurf2 != 0x0) {
169 assert(defsurf2->get_mp() == uu.get_mp()) ;
171 newgraph = draw_bound ? 0 : 2 ;
184 int ndom = mp.get_mg()->get_nzone() ;
186 for (
int l=0; l<ndom-1; l++) {
189 newgraph = (l == ndom-2) ? 2 : 0 ;
void des_surface_y(const Scalar &defsurf, double y0, const char *device=0x0, int newgraph=3, double x_min=-1, double x_max=1, double z_min=-1, double z_max=1, const char *nomx=0x0, const char *nomz=0x0, const char *title=0x0, int nxpage=1, int nypage=1)
Basic routine for drawing a stellar surface in a plane Y=constant.
Standard units of space, time and mass.
void des_equipot(float *uutab, int nx, int ny, float xmin, float xmax, float ymin, float ymax, int ncour, const char *nomx, const char *nomy, const char *title, const char *device, int newgraph, int nxpage, int nypage)
Basic routine for drawing isocontours.
void des_domaine_y(const Map &mp, int l0, double y0, const char *device=0x0, int newgraph=3, double x_min=-1, double x_max=1, double z_min=-1, double z_max=1, const char *nomx=0x0, const char *nomz=0x0, const char *title=0x0, int nxpage=1, int nypage=1)
Basic routine for drawing the outer boundary of a given domain in a plane Y=constant.
void des_bi_coupe_y(const Cmp &uu, double y0, int nzdes, const char *title=0x0, const Cmp *defsurf=0x0, const Cmp *defsurf2=0x0, double zoom=1.2, bool draw_bound=true, int ncour=15, int nx=100, int nz=100)
Draws isocontour lines of a Cmp in a plane Y=constant.