File:Atan2-Red-Blue.png
Original file (1,024 × 1,024 pixels, file size: 68 KB, MIME type: image/png)
Captions
Summary[edit]
DescriptionAtan2-Red-Blue.png |
English: Visualization of the values of the atan2() function in (-1,-1) … (+1,+1). Blue = negative, Red = positive values, White = 0.
Deutsch: Visualisierung der Werte der atan2()-Funktion im Intervall (-1,-1) … (+1,+1). Blau = Negative Werte, Rot = positive Werte. Weiß = 0. |
Date | |
Source | Own work |
Author | RokerHRO |
The following self-written C function created the image (as PPM), wich I converted into PNG and optimized to uplad to Commons:
void atanPlane()
{
printf("P6\n%d %d 255\n", GridSize, GridSize);
for(int y=0; y<GridSize; ++y)
for(int x=0; x<GridSize; ++x)
{
const double dy = (GridSize/2)-y;
const double dx = x - (GridSize/2);
const double a = atan2(dy,dx)/M_PI;
unsigned char rgb[4];
if(a<0)
{
rgb[0] = rgb[1] = 255 + 255*a;
rgb[2] = 255 + 127*a;
}else{
rgb[0] = 255;
rgb[1] = rgb[2] = 255 - 255*a;
}
fwrite(rgb, 3, 1, stdout);
}
fflush(stdout);
}
Licensing[edit]
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 10:21, 18 January 2017 | 1,024 × 1,024 (68 KB) | RokerHRO (talk | contribs) | {{Information |Description ={{en|1=Visualization of the values of the atan2() function in (-1,-1) … (+1,+1). Blue = negative, Red = positive values, White = 0.}} {{de|1=Visualisierung der Werte der atan2()-Funktion im Intervall (-1,-1) … (+1,+1)... |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
File change date and time | 08:11, 18 January 2017 |
---|