- uint16_t *img = new uint16_t[int(maxX*maxY)];
-
- for(int i3=0;i3<int(maxX*maxY);i3++)
- img[i3] = 0;
-
- for(int i2=0; i2<NP; i2++) {
- img[ int(maxX -(X[i2]-1))+ int((maxY -Y[i2])* maxX) ] = int(tabVal[i2]*100);
- }
+ for(int i2=0; i2<NP; i2++) {
+
+ int ordX = int(X[i2]*4.-30);
+ int ordY = int(maxY*4.) - int(Y[i2]*4.)+30;
+// img[ /*int(maxX) -*/ int(X[i2]+0.5-1) + (int(maxY+0.5) - int(Y[i2]+0.5)) * int(maxX+0.5) ] = int(tabVal[i2]*100);
+
+// img[ /*int(maxX) -*/ int(X[i2]*4.-30) + (int(maxY*4.) - int(Y[i2]*4.)+30) * int(maxX*4.) ] = int(tabVal[i2]*100);
+ img[ /*int(maxX) -*/ ordX + ordY * int(maxX*4.) ] = int(tabVal[i2]*100);
+
+ // Try to round up, just to see.
+ for(int iii=ordY-3; iii<ordY+4; iii++) for(int jjj=ordX-3; jjj<ordX+4; jjj++)
+ img[ jjj + iii * int(maxX*4.) ] = int(tabVal[i2]*100);
+ std::cout << int(X[i2]*4.) << " " << int(Y[i2]*4.) << " = " << int(tabVal[i2]*100) << std::endl;
+ }