Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93055167
cp_im.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 25, 20:55
Size
1 KB
Mime Type
text/x-c
Expires
Wed, Nov 27, 20:55 (2 d)
Engine
blob
Format
Raw Data
Handle
22563539
Attached To
R1448 Lenstool-HPC
cp_im.c
View Options
#include<stdio.h>
#include<math.h>
#include<fonction.h>
#include<constant.h>
#include<dimension.h>
#include<structure.h>
/****************************************************************/
/* nom: comp_im */
/* auteur: Jean-Paul Kneib */
/* date: 10/02/92 */
/* place: Toulouse */
/****************************************************************/
void cp_im( double **im,
int nx, int ny,
double xmin, double xmax, double ymin, double ymax,
struct galaxie *source,
int nbs )
{
register int i, j, k;
double scalex, scaley, dx, dy;
double f;
struct point ps, pi;
dx = xmax - xmin;
dy = ymax - ymin;
scalex = dx / (nx - 1);
scaley = dy / (ny - 1);
for (j = 0; j < nx; j++)
{
pi.x = xmin + ((double)j) * scalex;
for (k = 0; k < ny; k++)
{
pi.y = ymin + ((double)k) * scaley;
e_dpl(&pi, source[0].dr, &ps);
for (i = 0; i < nbs; i++)
{
f = g_profil(ps.x, ps.y, source[i]);
im[k][j] += f;
}
};
};
}
Event Timeline
Log In to Comment