Bestand:Go position, life and death, 1.png

Pagina-inhoud wordt niet ondersteund in andere talen.
Uit Wikipedia, de vrije encyclopedie

Oorspronkelijk bestand(1.969 × 1.729 pixels, bestandsgrootte: 121 kB, MIME-type: image/png)


Bestand:Go position, life and death, 1.svg is een vectorversie van dit bestand. Indien niet van slechtere kwaliteit dient deze gebruikt te worden in plaats van deze rasterafbeelding.

File:Go position, life and death, 1.png → File:Go position, life and death, 1.svg

Zie Help:SVG voor meer informatie.

In andere talen
Alemannisch  Bahasa Indonesia  Bahasa Melayu  British English  català  čeština  dansk  Deutsch  eesti  English  español  Esperanto  euskara  français  Frysk  galego  hrvatski  Ido  italiano  lietuvių  magyar  Nederlands  norsk bokmål  norsk nynorsk  occitan  Plattdüütsch  polski  português  português do Brasil  română  Scots  sicilianu  slovenčina  slovenščina  suomi  svenska  Tiếng Việt  Türkçe  vèneto  Ελληνικά  беларуская (тарашкевіца)  български  македонски  нохчийн  русский  српски / srpski  татарча/tatarça  українська  ქართული  հայերեն  বাংলা  தமிழ்  മലയാളം  ไทย  한국어  日本語  简体中文  繁體中文  עברית  العربية  فارسی  +/−
SVG-bestand

An example of life and death. I'm quite proud of the stones in this image. The shading is done according to the Lambertian diffuse lighting model. Notice the shadows! Now that the code is figured out, it's trivial to set up other Go configurations Just ask!

To make this image, save the following Metapost program as go.mp:

scale=0.6in;   % scale is the diameter of a stone
linethickness = scale/25;
pickup pencircle scaled linethickness;
num = 150;  % Levels of shading in each stone.

color shadow;
shadow = (0.44,0.36,0.18);

lx = -0.35;
ly = 0.35;
lz = sqrt(1-lx*lx-ly*ly);
  % light source direction vector.
  % note that lz = cos(ltip).
ltheta = angle(lx, ly);
ltip = angle(lz, lx++ly);
  % the angle at which the light source is tipped.

path ellipse;
ellipse := fullcircle scaled scale xscaled lz;


% First, we draw the black stone, and a special version for the bottom row:
picture blackstone;
blackstone = currentpicture;
picture blackstoneb;
blackstoneb = currentpicture;

addto blackstone contour fullcircle scaled scale
  shifted (0.05*scale*dir(ltheta+180)) 
  withcolor shadow;
addto blackstoneb contour fullcircle scaled scale
  shifted (0.05*scale*dir(ltheta+180)) 
  withcolor shadow;
addto blackstone doublepath (0.55*scale,0)--(0,0)--(0,-0.55*scale)
  withpen currentpen;
addto blackstoneb doublepath (0.55*scale,0)--(0,0)
  withpen currentpen;
addto blackstone contour fullcircle scaled scale;
addto blackstoneb contour fullcircle scaled scale;

for ratio = 1 step -1/num until 0 :
  path ourellipse;
  ourellipse = ellipse scaled ratio
    shifted (scale*(1+-+ratio)*sind(ltip)/2, 0)
    rotated ltheta;

  addto blackstone contour ourellipse withcolor (0.7*(1+-+ratio)**2*white);
  addto blackstoneb contour ourellipse withcolor (0.7*(1+-+ratio)**2*white);
endfor;


% Next, we draw a white stone, and a special version for the bottom row:
picture whitestone;
whitestone = currentpicture;
picture whitestoneb;
whitestoneb = currentpicture;

basewhite = 0.7;
addto whitestone contour fullcircle scaled scale
  shifted (0.05*scale*dir(ltheta+180)) 
  withcolor shadow;
addto whitestoneb contour fullcircle scaled scale
  shifted (0.05*scale*dir(ltheta+180)) 
  withcolor shadow;
addto whitestone doublepath (0.55*scale,0)--(0,0)--(0,-0.55*scale)
   withpen currentpen;
addto whitestoneb doublepath (0.55*scale,0)--(0,0) withpen currentpen;
addto whitestone contour fullcircle scaled scale
   withcolor (basewhite*white);
addto whitestoneb contour fullcircle scaled scale
   withcolor (basewhite*white);

for ratio = 1 step -1/num until 0 :
  path ourellipse;
  ourellipse = ellipse scaled ratio
    shifted (scale*(1+-+ratio)*sind(ltip)/2, 0)
    rotated ltheta;

  addto whitestone contour ourellipse withcolor
    (basewhite + (1-basewhite)*((1+-+ratio)**4))*white;
  addto whitestoneb contour ourellipse withcolor
    (basewhite + (1-basewhite)*((1+-+ratio)**4))*white;
endfor;


boardwidth = 8;
boardheight = 7;
  % the lower left 8-by-7 positions of a go board.

def drawboard = 
  pickup pencircle scaled linethickness;
  fill unitsquare xscaled ((boardwidth+0.2)*scale)
    yscaled ((boardheight+0.2)*scale) shifted (-0.6*scale, -0.6scale)
    withcolor (0.86,0.70,0.36);
  for i = 0 upto boardwidth - 1 :
    draw (scale*i,0) -- (scale*i, (boardheight-0.4)*scale);
  endfor;
  for j = 0 upto boardheight - 1 :
    draw (0,scale*j) -- ((boardwidth-0.4)*scale,scale*j);
  endfor;
enddef;

def wh(expr x, y) =
  if y = 0 :
    draw whitestoneb shifted (x*scale, y*scale);
  else :
    draw whitestone shifted (x*scale, y*scale);
  fi;
enddef;
def bl(expr x, y) =
  if y = 0 :
    draw blackstoneb shifted (x*scale, y*scale);
  else :
    draw blackstone shifted (x*scale, y*scale);
  fi;
enddef;
def lab(expr num, x, y, color) =
  draw thelabel(num, (0, 0)) scaled (0.75*scale/10pt)
    shifted (x*scale, y*scale) withcolor color;
enddef;


beginfig(1);
  drawboard;

  wh(2,5);wh(1,4);wh(1,3);bl(2,3);bl(3,3);bl(4,3);bl(1,2);wh(2,2);
  wh(3,2);bl(5,2);bl(6,2);bl(1,1);wh(4,1);

  lab("1", 1, 1, white);
endfig;

beginfig(2);
  drawboard;

  wh(2,5);wh(1,4);wh(1,3);bl(2,3);bl(3,3);bl(4,3);bl(1,2);wh(2,2);
  wh(3,2);bl(5,2);bl(6,2);bl(1,1);bl(2,1);wh(3,1);wh(4,1);wh(3,0);

  lab("2", 3, 0, black);
  lab("3", 2, 1, white);
  lab("4", 3, 1, black);
endfig;

beginfig(3);
  drawboard;

  wh(2,5);wh(1,4);wh(1,3);bl(2,3);bl(3,3);bl(4,3);wh(0,2);bl(1,2);
  wh(2,2);wh(3,2);bl(4,2);bl(5,2);bl(6,2);wh(0,1);bl(1,1);bl(2,1);
  wh(3,1);wh(4,1);bl(5,1);bl(1,0);wh(3,0);

  lab("5", 4, 2, white);
  lab("6", 0, 2, black);
  lab("7", 1, 0, white);
  lab("8", 0, 1, black);
  lab("9", 5, 1, white);
endfig;  

beginfig(4);
  drawboard;

  wh(2,5);wh(1,4);wh(0,3);wh(1,3);bl(2,3);bl(3,3);bl(4,3);wh(0,2);
  bl(1,2);wh(2,2);wh(3,2);bl(4,2);bl(5,2);bl(6,2);wh(0,1);bl(1,1);
  bl(2,1);wh(3,1);wh(4,1);bl(5,1);wh(0,0);bl(1,0);wh(3,0);bl(4,0);
  bl(5,0);

  lab("10", 0, 3, black);
  lab("11", 5, 0, white);
  lab("12", 0, 0, black);
  lab("13", 4, 0, white);
endfig;  
end;

Compile with mpost, producing go.1, go.2, go.3, and go.4. Save the following as go.tex:

\documentclass[10pt]{article}
 \usepackage{graphicx}
 \pagestyle{empty}
\begin{document}
 \includegraphics{\fig}
\end{document}

To get the font for the numbers, you have to digest Metapost's output through TeX. The following Bash command accomplishes that:

for i in 1 2 3 4; do latex "\def\fig{go.$i} \input go"; dvips go.dvi -o go.$i.ps; done

You now have go.1.ps through go.4.ps. Open in Gimp, resolution 400, "try bounding box", weak anti-aliasing. Crop at (826, 698), width = 1969, height = 1729. Save as PNG.

Ik, de auteursrechthebbende van dit werk, maak het hierbij onder de volgende licenties beschikbaar:
GNU head Toestemming wordt verleend voor het kopiëren, verspreiden en/of wijzigen van dit document onder de voorwaarden van de GNU-licentie voor vrije documentatie, versie 1.2 of enige latere versie als gepubliceerd door de Free Software Foundation; zonder Invariant Sections, zonder Front-Cover Texts, en zonder Back-Cover Texts. Een kopie van de licentie is opgenomen in de sectie GNU-licentie voor vrije documentatie.
w:nl:Creative Commons
naamsvermelding Gelijk delen
Dit bestand is gelicenseerd onder de Creative Commons-licentie Naamsvermelding-Gelijk delen 3.0 Unported
De gebruiker mag:
  • Delen – het werk kopiëren, verspreiden en doorgeven
  • Remixen – afgeleide werken maken
Onder de volgende voorwaarden:
  • naamsvermelding – U moet op een gepaste manier aan naamsvermelding doen, een link naar de licentie geven, en aangeven of er wijzigingen in het werk zijn aangebracht. U mag dit op elke redelijke manier doen, maar niet zodanig dat de indruk wordt gewekt dat de licentiegever instemt met uw werk of uw gebruik van zijn werk.
  • Gelijk delen – Als u het werk heeft geremixt, veranderd, of erop heeft voortgebouwd, moet u het gewijzigde materiaal verspreiden onder dezelfde licentie als het oorspronkelijke werk, of een daarmee compatibele licentie.
Deze licentietag is toegevoegd aan dit bestand in verband met de GFDL licentie-update.
w:nl:Creative Commons
naamsvermelding Gelijk delen
Dit bestand is gelicenseerd onder de Creative Commons-licentie Naamsvermelding-Gelijk delen 2.0 Unported
De gebruiker mag:
  • Delen – het werk kopiëren, verspreiden en doorgeven
  • Remixen – afgeleide werken maken
Onder de volgende voorwaarden:
  • naamsvermelding – U moet op een gepaste manier aan naamsvermelding doen, een link naar de licentie geven, en aangeven of er wijzigingen in het werk zijn aangebracht. U mag dit op elke redelijke manier doen, maar niet zodanig dat de indruk wordt gewekt dat de licentiegever instemt met uw werk of uw gebruik van zijn werk.
  • Gelijk delen – Als u het werk heeft geremixt, veranderd, of erop heeft voortgebouwd, moet u het gewijzigde materiaal verspreiden onder dezelfde licentie als het oorspronkelijke werk, of een daarmee compatibele licentie.
U mag zelf één van de licenties kiezen.

Bijschriften

Beschrijf in één regel wat dit bestand voorstelt

Items getoond in dit bestand

beeldt af

Bestandsgeschiedenis

Klik op een datum/tijd om het bestand te zien zoals het destijds was.

Datum/tijdMiniatuurAfmetingenGebruikerOpmerking
huidige versie5 jan 2005 06:04Miniatuurafbeelding voor de versie van 5 jan 2005 06:041.969 × 1.729 (121 kB)Grendelkhanoptipng -o7 for 5% reduction in filesize
5 jan 2005 03:52Miniatuurafbeelding voor de versie van 5 jan 2005 03:521.969 × 1.729 (128 kB)Dbenbenngo position 1, second try
5 jan 2005 03:37Miniatuurafbeelding voor de versie van 5 jan 2005 03:371.921 × 1.681 (123 kB)DbenbennGo position

Dit bestand wordt op de volgende pagina gebruikt:

Globaal bestandsgebruik

De volgende andere wiki's gebruiken dit bestand: