Accueil > > > OPENGL : SINUSOIDES 3D
OPENGL : SINUSOIDES 3D
Information sur la source
Description
Programme qui montre deux sons.
L'intensite du son decroit avec la distance.
En plus il y a le tracage des decibels de la somme des deux bruit en un point donne.
Source
- #include <windows.h>
- #include <math.h>
- #include <gl/gl.h>
- #include <gl/glu.h>
- #include <gl/glaux.h>
-
- typedef struct tagFUNC_SINUS
- {
- double dx; // delta x
- double dy; // delta y
- double dz; // delta z
- double h; // amplitude
- double lambda; // longeur d'onde
- void (*funcColor)(double); // fonction de coloriage
- double arg;
- }FUNC_SINUS,*P_FUNC_SINUS;
-
- typedef struct tagFUNC_SUM
- {
- double dz; // delta z
- void (*funcColor)(double); // fonction de coloriage
- P_FUNC_SINUS a;
- P_FUNC_SINUS b;
- double arg;
- }FUNC_SUM,*P_FUNC_SUM;
- //------------------------------------------------------------
- #define PI 3.1415926535
- //------------------------------------------------------------
- #define MY_MIN_ZOOM 1
- #define MY_MAX_ZOOM 100
-
- #define MY_CUBE_LINE 100
- #define MY_SINUS_1 101
- #define MY_SINUS_2 102
- #define MY_SUM 103
- //------------------------------------------------------------
- void RePaint(HDC DC,double zoom,double theta,double phi)
- {
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-
-
- // position de l'oeil
- gluLookAt(zoom*cos(theta)*cos(phi),zoom*sin(theta)*cos(phi),zoom*sin(phi),0,0,0,cos(theta-PI)*cos(PI/2.-phi),sin(theta-PI)*cos(PI/2.-phi),sin(PI/2.-phi));
-
- // on trace les lignes du cube
- glCallList(MY_CUBE_LINE);
- // on trace la premire sinusoide
- glCallList(MY_SINUS_1);
- // on trace la seconde sinusoide
- glCallList(MY_SINUS_2);
- // on trace la somme (franges d'interferences)
- glCallList(MY_SUM);
-
- glPopMatrix();
-
- SwapBuffers(DC);
- }
- //------------------------------------------------------------
- void InitPixelFormat(HDC hdc)
- {
- PIXELFORMATDESCRIPTOR pfd = {sizeof (PIXELFORMATDESCRIPTOR),1,PFD_SUPPORT_OPENGL | PFD_TYPE_RGBA | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER,16,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0};
- SetPixelFormat(hdc,ChoosePixelFormat(hdc,&pfd),&pfd);
- }
- //------------------------------------------------------------
- // degrades du rouge
- void FillColorRedToYellow(double x)
- {glColor3d(1.,x,0.);}
- void FillColorRedToMagenta(double x)
- {glColor3d(1.,0.,x);}
- void FillColorRedToWhite(double x)
- {glColor3d(1.,x,x);}
- // degrades du vert
- void FillColorGreenToRed(double x)
- {glColor3d(1.-x,x,x);}
- void FillColorGreenToWhite(double x)
- {glColor3d(x,1.,x);}
- void FillColorGreenYellow(double x)
- {glColor3d(x,1.,0.);}
- void FillColorGreenToCyan(double x)
- {glColor3d(0.,1.,x);}
- // degrades du bleu
- void FillColorBlueToMaganta(double x)
- {glColor3d(x,0.,1.);}
- void FillColorBlueToWhite(double x)
- {glColor3d(x,x,1.);}
- void FillColorBlueToCyan(double x)
- {glColor3d(0.,x,1.);}
- // degrade de gris
- void FillColorBlackToWhite(double x)
- {glColor3d(x,x,x);}
- //------------------------------------------------------------
- // construit un sinusoide 3D de centre (dx,dy,0)
- // d'amplitude <h>, et de longueur d'onde <lambda>
- double calcR(P_FUNC_SINUS p,double x,double y)
- {
- return sqrt((x-p->dx)*(x-p->dx)+(y-p->dy)*(y-p->dy));
- }
-
- double funcSinus(P_FUNC_SINUS p,double x,double y)
- {
- // distance
- double r;
-
- p->arg = r = calcR(p,x,y);
-
- if(r > 0.)
- {
- return p->dz - p->h*sin(r*2.*PI/p->lambda)/r;
- }
- else
- {
- return p->dz - p->h*2.*PI/p->lambda;
- }
- }
- void colorSinus(P_FUNC_SINUS p,double z)
- {
- p->funcColor(0.5+(z-p->dz)/(2.*p->h));
- //p->funcColor(1.-1./(1.+p->arg));
- }
- //------------------------------------------------------------
- // construit l'interference de deux sinusoides
- // Ici calculs complexes ...
- double funcSum(P_FUNC_SUM p,double x,double y)
- {
- double rA,rB;
- double reA,imA;
- double reB,imB;
- double k;
-
- k = 2.*PI/p->a->lambda;
- rA = calcR(p->a,x,y);
- rB = calcR(p->b,x,y);
-
- if(rA <= 0. || rB <= 0.)
- {
- p->arg = 0.;
- return 0.;
- }
-
- reA = cos(k*rA)/rA;
- reB = cos(k*rB)/rB;
- imA = sin(k*rA)/rA;
- imB = sin(k*rB)/rB;
-
- // l'argument
- p->arg = atan2(imA + imB,reA + reB);
- // le module
- return p->dz+4*log10((reA + reB)*(reA + reB)+(imA + imB)*(imA + imB));
- }
- void colorSum(P_FUNC_SUM p,double z)
- {
- //p->funcColor(0.5+(p->arg/(2.*PI)));
- p->funcColor(0.6-(7+z-p->dz)/(9.));
- }
-
- //------------------------------------------------------------
- void CreateGraph3D(double (*calcFunc)(void*,double,double),void (*funcColor)(void*,double),void *param)
- {
- double x,y;
- double step;
-
- step = 0.2;
-
- for(y=-10.+step;y<=+10.;y+=step)
- {
- glBegin(GL_QUAD_STRIP);
- for(x=-10.;x<=+10.;x+=step)
- {
- double z;
-
- // on doit garantir qu'il faut faire le calcul
- // AVANT le coloriage
- z = calcFunc(param,x,y - step);
- funcColor(param,z);
- glVertex3d(x,y - step,z);
-
- z = calcFunc(param,x,y);
- funcColor(param,z);
- glVertex3d(x,y,calcFunc(param,x,y));
- }
- glEnd();
- }
-
- }
- //------------------------------------------------------------
- void CreateNewList(void)
- {
- FUNC_SINUS f1,f2;
- FUNC_SUM fs;
-
- glNewList(MY_CUBE_LINE,GL_COMPILE);
- glColor3d(0.,1.,0.);
-
-
- glBegin(GL_LINE_LOOP);
- glVertex3d(-10.,-10.,-10.);
- glVertex3d(-10.,-10.,+10.);
- glVertex3d(-10.,+10.,+10.);
- glVertex3d(-10.,+10.,-10.);
- glEnd();
-
- glBegin(GL_LINE_LOOP);
- glVertex3d(+10.,-10.,-10.);
- glVertex3d(+10.,-10.,+10.);
- glVertex3d(+10.,+10.,+10.);
- glVertex3d(+10.,+10.,-10.);
- glEnd();
-
- glBegin(GL_LINES);
- glVertex3d(+10.,-10.,-10.);
- glVertex3d(-10.,-10.,-10.);
- glVertex3d(+10.,-10.,+10.);
- glVertex3d(-10.,-10.,+10.);
- glVertex3d(+10.,+10.,+10.);
- glVertex3d(-10.,+10.,+10.);
- glVertex3d(+10.,+10.,-10.);
- glVertex3d(-10.,+10.,-10.);
- glEnd();
-
- glEndList();
-
- glNewList(MY_SINUS_1,GL_COMPILE);
-
- f1.dx = -0.;
- f1.dy = -5.5;
- f1.dz = -10.;
- f1.h = 5.;
- f1.lambda = 1.5;
- f1.funcColor = FillColorRedToYellow;
-
- CreateGraph3D(funcSinus,colorSinus,&f1);
-
- glEndList();
-
- glNewList(MY_SINUS_2,GL_COMPILE);
-
- f2.dx = +0.;
- f2.dy = +5.5;
- f2.dz = -10.;
- f2.h = 5.;
- f2.lambda = 1.5;
- f2.funcColor = FillColorBlueToCyan;
-
- CreateGraph3D(funcSinus,colorSinus,&f2);
-
- glEndList();
-
- glNewList(MY_SUM,GL_COMPILE);
-
- fs.dz = 12.5;
- fs.a = &f1;
- fs.b = &f2;
- fs.funcColor = FillColorGreenToRed;
-
- CreateGraph3D(funcSum,colorSum,&fs);
-
- glEndList();
-
- }
- //------------------------------------------------------------
- LRESULT CALLBACK WindowProc(HWND hwnd,UINT iMsg,WPARAM wParam,LPARAM lParam)
- {
- static HDC DC;
- static HGLRC RC;
- static int cxClient,cyClient;
- static double zoom,theta,phi,_theta,_phi;
- static BOOL isMouseDown;
- static int xMouseStart,yMouseStart;
-
- // traitement des messages
- switch (iMsg)
- {
- case WM_CREATE:
- {
- DC = GetDC(hwnd);
- InitPixelFormat(DC);
- RC = wglCreateContext(DC);
- wglMakeCurrent(DC,RC);
- glEnable(GL_DEPTH_TEST);
- glClearColor(0,0,0,0);
-
- zoom = 50.;
- theta = 0.;
- phi = 0.;
-
- CreateNewList();
- break;
- }
- case WM_SIZE:
- {
- cxClient = LOWORD(lParam); cxClient = (cxClient ? cxClient : 1);
- cyClient = HIWORD(lParam); cyClient = (cyClient ? cyClient : 1);
- glViewport(0,0,cxClient,cyClient);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(45.,(float)(cxClient)/(float)(cyClient),0.1,1000);
- break;
- }
- case WM_CHAR:
- {
- switch((char)wParam)
- {
- case 'a':
- {
- zoom -= 1.;
- if(zoom < MY_MIN_ZOOM) zoom = MY_MIN_ZOOM;
- return 0;
- }
- case 'q':
- {
- zoom += 1.;
- if(zoom > MY_MAX_ZOOM) zoom = MY_MAX_ZOOM;
- return 0;
- }
- }
- break;
- }
- case WM_LBUTTONDOWN:
- {
- xMouseStart = LOWORD(lParam);
- yMouseStart = HIWORD(lParam);
- // on sauvegarde les angles
- _theta = theta;
- _phi = phi;
- isMouseDown = TRUE;
- SetCapture(hwnd);
- return 0;
- }
- case WM_LBUTTONUP:
- {
- if(isMouseDown)
- {
- ReleaseCapture();
- isMouseDown = FALSE;
- }
- return 0;
- }
- case WM_MOUSEMOVE:
- {
- if(isMouseDown)
- {
- int x,y;
- x = (int) (__int16) LOWORD(lParam);
- y = (int) (__int16) HIWORD(lParam);
-
- // attention, comme les coordonnees en Y
- // client sont inversees (de haut en bas)
- // il faut faire -, et non +
- // comme pout le X
- theta = _theta + ((xMouseStart - x)*2*PI)/(double)cxClient;
- phi = _phi - ((yMouseStart - y)*2*PI)/(double)cyClient;
- }
- return 0;
- }
- case WM_PAINT:
- {
- RePaint(DC,zoom,theta,phi);
- return 0;
- }
- case WM_DESTROY:
- {
- glDeleteLists(MY_CUBE_LINE,1);
-
- wglMakeCurrent(NULL, NULL);
- wglDeleteContext(RC);
- ReleaseDC(hwnd,DC);
- PostQuitMessage(0);
- break;
- }
- }
- return DefWindowProc(hwnd,iMsg,wParam,lParam);
- }
- //------------------------------------------------------------
- int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow)
- {
- WNDCLASS wc;
- MSG msg;
- HWND hWnd;
-
- wc.style = CS_OWNDC;
- wc.lpfnWndProc = WindowProc;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = hInstance;
- wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
- wc.hCursor = LoadCursor(NULL, IDC_ARROW);
- wc.hbrBackground = NULL;
- wc.lpszMenuName = NULL;
- wc.lpszClassName = "jcdSINUS3D";
-
- RegisterClass(&wc);
-
- hWnd = CreateWindow("jcdSINUS3D","Franges d'interférences 3D à deux sources sinusoïdales (JCD)",
- WS_OVERLAPPEDWINDOW | WS_VISIBLE,
- CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
- NULL,NULL,hInstance,NULL
- );
-
- while(GetMessage(&msg,NULL,0,0))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
-
- return 0;
- }
#include <windows.h>
#include <math.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glaux.h>
typedef struct tagFUNC_SINUS
{
double dx; // delta x
double dy; // delta y
double dz; // delta z
double h; // amplitude
double lambda; // longeur d'onde
void (*funcColor)(double); // fonction de coloriage
double arg;
}FUNC_SINUS,*P_FUNC_SINUS;
typedef struct tagFUNC_SUM
{
double dz; // delta z
void (*funcColor)(double); // fonction de coloriage
P_FUNC_SINUS a;
P_FUNC_SINUS b;
double arg;
}FUNC_SUM,*P_FUNC_SUM;
//------------------------------------------------------------
#define PI 3.1415926535
//------------------------------------------------------------
#define MY_MIN_ZOOM 1
#define MY_MAX_ZOOM 100
#define MY_CUBE_LINE 100
#define MY_SINUS_1 101
#define MY_SINUS_2 102
#define MY_SUM 103
//------------------------------------------------------------
void RePaint(HDC DC,double zoom,double theta,double phi)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
// position de l'oeil
gluLookAt(zoom*cos(theta)*cos(phi),zoom*sin(theta)*cos(phi),zoom*sin(phi),0,0,0,cos(theta-PI)*cos(PI/2.-phi),sin(theta-PI)*cos(PI/2.-phi),sin(PI/2.-phi));
// on trace les lignes du cube
glCallList(MY_CUBE_LINE);
// on trace la premire sinusoide
glCallList(MY_SINUS_1);
// on trace la seconde sinusoide
glCallList(MY_SINUS_2);
// on trace la somme (franges d'interferences)
glCallList(MY_SUM);
glPopMatrix();
SwapBuffers(DC);
}
//------------------------------------------------------------
void InitPixelFormat(HDC hdc)
{
PIXELFORMATDESCRIPTOR pfd = {sizeof (PIXELFORMATDESCRIPTOR),1,PFD_SUPPORT_OPENGL | PFD_TYPE_RGBA | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER,16,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0};
SetPixelFormat(hdc,ChoosePixelFormat(hdc,&pfd),&pfd);
}
//------------------------------------------------------------
// degrades du rouge
void FillColorRedToYellow(double x)
{glColor3d(1.,x,0.);}
void FillColorRedToMagenta(double x)
{glColor3d(1.,0.,x);}
void FillColorRedToWhite(double x)
{glColor3d(1.,x,x);}
// degrades du vert
void FillColorGreenToRed(double x)
{glColor3d(1.-x,x,x);}
void FillColorGreenToWhite(double x)
{glColor3d(x,1.,x);}
void FillColorGreenYellow(double x)
{glColor3d(x,1.,0.);}
void FillColorGreenToCyan(double x)
{glColor3d(0.,1.,x);}
// degrades du bleu
void FillColorBlueToMaganta(double x)
{glColor3d(x,0.,1.);}
void FillColorBlueToWhite(double x)
{glColor3d(x,x,1.);}
void FillColorBlueToCyan(double x)
{glColor3d(0.,x,1.);}
// degrade de gris
void FillColorBlackToWhite(double x)
{glColor3d(x,x,x);}
//------------------------------------------------------------
// construit un sinusoide 3D de centre (dx,dy,0)
// d'amplitude <h>, et de longueur d'onde <lambda>
double calcR(P_FUNC_SINUS p,double x,double y)
{
return sqrt((x-p->dx)*(x-p->dx)+(y-p->dy)*(y-p->dy));
}
double funcSinus(P_FUNC_SINUS p,double x,double y)
{
// distance
double r;
p->arg = r = calcR(p,x,y);
if(r > 0.)
{
return p->dz - p->h*sin(r*2.*PI/p->lambda)/r;
}
else
{
return p->dz - p->h*2.*PI/p->lambda;
}
}
void colorSinus(P_FUNC_SINUS p,double z)
{
p->funcColor(0.5+(z-p->dz)/(2.*p->h));
//p->funcColor(1.-1./(1.+p->arg));
}
//------------------------------------------------------------
// construit l'interference de deux sinusoides
// Ici calculs complexes ...
double funcSum(P_FUNC_SUM p,double x,double y)
{
double rA,rB;
double reA,imA;
double reB,imB;
double k;
k = 2.*PI/p->a->lambda;
rA = calcR(p->a,x,y);
rB = calcR(p->b,x,y);
if(rA <= 0. || rB <= 0.)
{
p->arg = 0.;
return 0.;
}
reA = cos(k*rA)/rA;
reB = cos(k*rB)/rB;
imA = sin(k*rA)/rA;
imB = sin(k*rB)/rB;
// l'argument
p->arg = atan2(imA + imB,reA + reB);
// le module
return p->dz+4*log10((reA + reB)*(reA + reB)+(imA + imB)*(imA + imB));
}
void colorSum(P_FUNC_SUM p,double z)
{
//p->funcColor(0.5+(p->arg/(2.*PI)));
p->funcColor(0.6-(7+z-p->dz)/(9.));
}
//------------------------------------------------------------
void CreateGraph3D(double (*calcFunc)(void*,double,double),void (*funcColor)(void*,double),void *param)
{
double x,y;
double step;
step = 0.2;
for(y=-10.+step;y<=+10.;y+=step)
{
glBegin(GL_QUAD_STRIP);
for(x=-10.;x<=+10.;x+=step)
{
double z;
// on doit garantir qu'il faut faire le calcul
// AVANT le coloriage
z = calcFunc(param,x,y - step);
funcColor(param,z);
glVertex3d(x,y - step,z);
z = calcFunc(param,x,y);
funcColor(param,z);
glVertex3d(x,y,calcFunc(param,x,y));
}
glEnd();
}
}
//------------------------------------------------------------
void CreateNewList(void)
{
FUNC_SINUS f1,f2;
FUNC_SUM fs;
glNewList(MY_CUBE_LINE,GL_COMPILE);
glColor3d(0.,1.,0.);
glBegin(GL_LINE_LOOP);
glVertex3d(-10.,-10.,-10.);
glVertex3d(-10.,-10.,+10.);
glVertex3d(-10.,+10.,+10.);
glVertex3d(-10.,+10.,-10.);
glEnd();
glBegin(GL_LINE_LOOP);
glVertex3d(+10.,-10.,-10.);
glVertex3d(+10.,-10.,+10.);
glVertex3d(+10.,+10.,+10.);
glVertex3d(+10.,+10.,-10.);
glEnd();
glBegin(GL_LINES);
glVertex3d(+10.,-10.,-10.);
glVertex3d(-10.,-10.,-10.);
glVertex3d(+10.,-10.,+10.);
glVertex3d(-10.,-10.,+10.);
glVertex3d(+10.,+10.,+10.);
glVertex3d(-10.,+10.,+10.);
glVertex3d(+10.,+10.,-10.);
glVertex3d(-10.,+10.,-10.);
glEnd();
glEndList();
glNewList(MY_SINUS_1,GL_COMPILE);
f1.dx = -0.;
f1.dy = -5.5;
f1.dz = -10.;
f1.h = 5.;
f1.lambda = 1.5;
f1.funcColor = FillColorRedToYellow;
CreateGraph3D(funcSinus,colorSinus,&f1);
glEndList();
glNewList(MY_SINUS_2,GL_COMPILE);
f2.dx = +0.;
f2.dy = +5.5;
f2.dz = -10.;
f2.h = 5.;
f2.lambda = 1.5;
f2.funcColor = FillColorBlueToCyan;
CreateGraph3D(funcSinus,colorSinus,&f2);
glEndList();
glNewList(MY_SUM,GL_COMPILE);
fs.dz = 12.5;
fs.a = &f1;
fs.b = &f2;
fs.funcColor = FillColorGreenToRed;
CreateGraph3D(funcSum,colorSum,&fs);
glEndList();
}
//------------------------------------------------------------
LRESULT CALLBACK WindowProc(HWND hwnd,UINT iMsg,WPARAM wParam,LPARAM lParam)
{
static HDC DC;
static HGLRC RC;
static int cxClient,cyClient;
static double zoom,theta,phi,_theta,_phi;
static BOOL isMouseDown;
static int xMouseStart,yMouseStart;
// traitement des messages
switch (iMsg)
{
case WM_CREATE:
{
DC = GetDC(hwnd);
InitPixelFormat(DC);
RC = wglCreateContext(DC);
wglMakeCurrent(DC,RC);
glEnable(GL_DEPTH_TEST);
glClearColor(0,0,0,0);
zoom = 50.;
theta = 0.;
phi = 0.;
CreateNewList();
break;
}
case WM_SIZE:
{
cxClient = LOWORD(lParam); cxClient = (cxClient ? cxClient : 1);
cyClient = HIWORD(lParam); cyClient = (cyClient ? cyClient : 1);
glViewport(0,0,cxClient,cyClient);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.,(float)(cxClient)/(float)(cyClient),0.1,1000);
break;
}
case WM_CHAR:
{
switch((char)wParam)
{
case 'a':
{
zoom -= 1.;
if(zoom < MY_MIN_ZOOM) zoom = MY_MIN_ZOOM;
return 0;
}
case 'q':
{
zoom += 1.;
if(zoom > MY_MAX_ZOOM) zoom = MY_MAX_ZOOM;
return 0;
}
}
break;
}
case WM_LBUTTONDOWN:
{
xMouseStart = LOWORD(lParam);
yMouseStart = HIWORD(lParam);
// on sauvegarde les angles
_theta = theta;
_phi = phi;
isMouseDown = TRUE;
SetCapture(hwnd);
return 0;
}
case WM_LBUTTONUP:
{
if(isMouseDown)
{
ReleaseCapture();
isMouseDown = FALSE;
}
return 0;
}
case WM_MOUSEMOVE:
{
if(isMouseDown)
{
int x,y;
x = (int) (__int16) LOWORD(lParam);
y = (int) (__int16) HIWORD(lParam);
// attention, comme les coordonnees en Y
// client sont inversees (de haut en bas)
// il faut faire -, et non +
// comme pout le X
theta = _theta + ((xMouseStart - x)*2*PI)/(double)cxClient;
phi = _phi - ((yMouseStart - y)*2*PI)/(double)cyClient;
}
return 0;
}
case WM_PAINT:
{
RePaint(DC,zoom,theta,phi);
return 0;
}
case WM_DESTROY:
{
glDeleteLists(MY_CUBE_LINE,1);
wglMakeCurrent(NULL, NULL);
wglDeleteContext(RC);
ReleaseDC(hwnd,DC);
PostQuitMessage(0);
break;
}
}
return DefWindowProc(hwnd,iMsg,wParam,lParam);
}
//------------------------------------------------------------
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int CmdShow)
{
WNDCLASS wc;
MSG msg;
HWND hWnd;
wc.style = CS_OWNDC;
wc.lpfnWndProc = WindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = "jcdSINUS3D";
RegisterClass(&wc);
hWnd = CreateWindow("jcdSINUS3D","Franges d'interférences 3D à deux sources sinusoïdales (JCD)",
WS_OVERLAPPEDWINDOW | WS_VISIBLE,
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,
NULL,NULL,hInstance,NULL
);
while(GetMessage(&msg,NULL,0,0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return 0;
}
Sources du même auteur
Sources de la même categorie
Commentaires et avis
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Forum
MATRICE TEMPLATEMATRICE TEMPLATE par hjr2610
Cliquez pour lire la suite par hjr2610 RE : SAC A DOS RE : SAC A DOS par hadjkaddour
Cliquez pour lire la suite par hadjkaddour
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|