Image:Aliased.png

From Wikipedia, the free encyclopedia

Wikimedia Commons logo This is a file from the Wikimedia Commons. The description on its description page there is shown below.
Commons is a freely licensed media file repository. You can help.
Description

Aliased chessboard

Created with a variant of this program, which I (Loisel 03:56 Jan 24, 2003 (UTC)) wrote myself:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <assert.h>
int color(double x, double y)
{
  double t,z;
  int i,j,k;

  x=x/128.0-0.5;
  y=y/1024.0;

  t=1.0/(y+0.01);
  z=t*x;
  i=floor(t);
  j=floor(z);
  k=i+j;
  /*  printf("%f %f -> %i %i %i\n",t,z,i,j,k%2); */
  return ((k%2)!=0);
}

double myrand()
{
  return rand()/((double)RAND_MAX);
}

int main()
{
  int i,j,k,l;
  double x,y;
  printf("P5\n128 128\n255\n");
  srand(time(0));
  for(i=0;i<128;i++)
    for(j=0;j<128;j++)
      {
 k=0;
 for(l=0;l<255;l++)
   {
     x=j+myrand();
     y=i+myrand();
     k+=color(x,y);
   }
 assert(k>=0 && k<=255);
 k=(k/4)*4; /* cygwin bug? */
 fwrite(&k,1,1,stdout);
      }
}
Source

Originally from en.wikipedia; description page is/was here.

Date

2003-01-24 (first version); 2007-09-15 (last version)

Author

Original uploader was Loisel at en.wikipedia Later versions were uploaded by Riumplus, AzaToth, Dicklyon at en.wikipedia.

Permission
(Reusing this image)

Licensed under the GFDL by the author; Released under the GNU Free Documentation License.


[edit] License information

Loisel, the copyright holder of this work, has published or hereby publishes it under the following license:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation license, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation license".

Aragonés | العربية | Asturianu | Български | বাংলা | ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী | Brezhoneg | Bosanski | Català | Cebuano | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | فارسی | Suomi | Français | Gaeilge | Galego | עברית | Hrvatski | Magyar | Bahasa Indonesia | Ido | Íslenska | Italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | Kurdî / كوردی | Latina | Lëtzebuergesch | Lietuvių | Bahasa Melayu | Nnapulitano | Nederlands | ‪Norsk (nynorsk)‬ | ‪Norsk (bokmål)‬ | Occitan | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски / Srpski | Svenska | తెలుగు | ไทย | Türkçe | Українська | اردو | Tiếng Việt | Volapük | Yorùbá | ‪中文(中国大陆)‬ | ‪中文(台灣)‬ | +/-

[edit] Original upload log

(All user names refer to en.wikipedia)

  • 2007-09-15 05:17 Dicklyon 128×128×8 (892 bytes) Reverted to version as of 13:34, 30 September 2005
  • 2007-09-14 22:56 AzaToth 1600×1200×8 (42986 bytes) remade it in povray
  • 2005-09-30 13:34 Riumplus 128×128×8 (892 bytes) Losslessly recompressed the image, shrinking file size by 39%
  • 2003-01-24 20:28 Loisel 128×128×8 (1450 bytes) slightly bugfixed image

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current19:43, 3 May 2007128×128 (892 B)MrHyde ({{Information |Description= |Source= |Date= |Author= |Permission= |other_versions= }} )
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):