Page 1 of 2

Go wallpapers

Posted: Sun Jul 14, 2013 3:53 am
by Shedal
I took some pictures of the Go board yesterday, and also a couple pics two years ago. Thought I'd share these with everyone in wallpaper format:

Image

Image

Image

Image

Image

Re: Go wallpapers

Posted: Sun Jul 14, 2013 3:59 am
by wineandgolover
Very nice!

Any chance for iPhone proportions?

Re: Go wallpapers

Posted: Sun Jul 14, 2013 4:02 am
by Shedal
wineandgolover wrote:Very nice!

Any chance for iPhone proportions?

Thanks!

Which iPhone? They have different screen proportions.

Re: Go wallpapers

Posted: Sun Jul 14, 2013 7:12 am
by wineandgolover
Well, since you're asking, I have an iPhone 4s and an iPad retina screen.

But, seriously don't feel the need to make them for me. Maybe somebody else will chime in. :tmbup:

Re: Go wallpapers

Posted: Sun Jul 14, 2013 7:42 am
by Shedal
wineandgolover wrote:Well, since you're asking, I have an iPhone 4s and an iPad retina screen.

But, seriously don't feel the need to make them for me. Maybe somebody else will chime in. :tmbup:

Yeah, someone could resize the pics I published to iPhone resolution. But 1920x1200 is not enough to resize for iPad retina.

Anyways, I happen to have the same devices as you have, so I played around with cropping for two of the pics:

http://dl.dropboxusercontent.com/u/5504 ... ne4s_1.jpg
http://dl.dropboxusercontent.com/u/5504 ... ne4s_2.jpg
http://dl.dropboxusercontent.com/u/5504 ... tina_1.jpg
http://dl.dropboxusercontent.com/u/5504 ... tina_2.jpg

http://dl.dropboxusercontent.com/u/5504 ... hone4s.jpg
http://dl.dropboxusercontent.com/u/5504 ... retina.jpg

Re: Go wallpapers

Posted: Sun Jul 14, 2013 7:48 am
by wineandgolover
Applied. Thanks!

Re: Go wallpapers

Posted: Sun Jul 14, 2013 3:03 pm
by Martin1974
Very nice! Thanks!

Posted: Sun Jul 14, 2013 3:25 pm
by EdLee
Hi Shedal, thanks. Which camera did you use for those photos ? :)

Re:

Posted: Sun Jul 14, 2013 3:27 pm
by Shedal
EdLee wrote:Which camera did you use for those photos ? :)

Nikon D90 and Nikon D800.

Re: Go wallpapers

Posted: Tue Aug 06, 2013 8:35 pm
by AKaios
Oh my god these are gorgeous. I think you should do another set of these. :mrgreen:

Really excited to use these as backgrounds. Thank you for sharing!

Re: Go wallpapers

Posted: Tue Aug 13, 2013 10:59 am
by pobe
I took this with my iPhone (4). Looks good enough for a phone background, imho... :)

Image
Go wallpaper by pobe, on Flickr

Re: Go wallpapers

Posted: Wed Aug 14, 2013 2:50 am
by pobe
When I get into something, I tend to geek out... Here's another one I made for my netbook. I could post this in higher resolution if anyone is interested. ;)

Image
Another go wallpaper by pobe, on Flickr

Go wallpapers

Posted: Fri Jul 04, 2014 11:52 pm
by pobe
Reviving this old thread with my latest hack... I wrote a small script that reads an SGF file and updates my wallpaper every 20 seconds. Looks like this on my linux netbook:

Image

Re: Go wallpapers

Posted: Sat Jul 05, 2014 2:32 pm
by Redbeard
Cool! Care to share the script?

Re: Go wallpapers

Posted: Sun Jul 06, 2014 12:32 am
by pobe
Sure, it's not exactly code to brag about but it works :) I'm pretty sure one could optimize it or write something much better. The life-checking function does redundant testing in some conditions, but I haven't bothered to tweak it.

It's perl, uses perlmagick for creating and saving the image and feh to set the background. There was a few comments in there, but they were my notes in swedish so I removed them.

Code: Select all

#!/usr/bin/perl

use Image::Magick;

$sleeptime = 20;
$imgfile = '/tmp/sgfwallpaper.png';
$lines = 19;
$width = 1024;
$height = 600;
$yoffset = $height / 12;
$gridsize = ($height - $yoffset * 2) / ($lines - 1);
$xoffset = ($width - (($lines - 1) * $gridsize)) / 2;
$bg = '#ba6'; # background color
$lc = '#333'; # lines and hoshi
$bc = '#111'; # black stones
$wc = '#eff'; # white stones
$lw = $height / 500; # stroke width (lines & hoshi)

$gb = Image::Magick->new(size=>$width.'x'.$height);
$gb->ReadImage("canvas:$bg");

@goban = ();
@checked = ();
for ($i = 0; $i < $lines; $i++) {
    for ($j = 0; $j < $lines; $j++) {
   $goban[$i][$j] = 0;
   $checked[$i][$j] = 0;
    }
}

# draw_hoshi(x, y)
sub draw_hoshi{
    my $x = $_[0] - 1;
    my $y = $_[1] - 1;
    $x = $xoffset + $x * $gridsize;
    $y = $yoffset + $y * $gridsize;
    $r = $y + $lw * 2;
    $gb->Draw(primitive=>'circle',points=>"$x,$y $x,$r",fill=>$lc);
}

# draw_stone(color, x, y, x-off, y-off)
sub draw_stone{
    my $f = $_[0];
    my $x = $_[1];
    my $y = $_[2];
    my $xoff = $_[3];
    my $yoff = $_[4];
    $x = $xoffset + $x * $gridsize + $xoff;
    $y = $yoffset + $y * $gridsize + $yoff;
    $r = $y + ($gridsize / 2.1);
    $gb->Draw(primitive=>'circle',points=>"$x,$y $x,$r",fill=>$f);
}

# liberties(x, y, color)
sub liberties{
    my $x = $_[0];
    my $y = $_[1];
    my $f = $_[2];
    my $lib = 0;

    if ($checked[$x][$y]) {
   return 0;
    }

    $checked[$x][$y] = 1;
    if ($x > 0 and !$goban[$x - 1][$y]) {
   $lib++;
    }
    if ($x < $lines - 1 and !$goban[$x + 1][$y]) {
   $lib++;
    }
    if ($y > 0 and !$goban[$x][$y - 1]) {
   $lib++;
    }
    if ($y < $lines - 1 and !$goban[$x][$y + 1]) {
   $lib++;
    }
    if ($lib < 4) {
   if ($y < $lines - 1 and $goban[$x][$y + 1] =~ /^$f/) {
       $lib += liberties($x, $y + 1, $f);
   }
   if ($y > 0 and $goban[$x][$y - 1] =~ /^$f/) {
       $lib += liberties($x, $y - 1, $f);
   }
   if ($x < $lines - 1 and $goban[$x + 1][$y] =~ /^$f/) {
       $lib += liberties($x + 1, $y, $f);
   }
   if ($x > 0 and $goban[$x - 1][$y] =~ /^$f/) {
       $lib += liberties($x - 1, $y, $f);
   }
    }
    $checked[$x][$y] = 0;
    return $lib;
}

# remove_stone(x, y, color)
sub remove_stone{
    my $x = $_[0];
    my $y = $_[1];
    my $f = $_[2];

    $goban[$x][$y] = 0;
    if ($y < $lines - 1 and $goban[$x][$y + 1] =~ /^$f/) {
   remove_stone($x, $y + 1, $f);
    }
    if ($y > 0 and $goban[$x][$y - 1] =~ /^$f/) {
   remove_stone($x, $y - 1, $f);
    }
    if ($x < $lines - 1 and $goban[$x + 1][$y] =~ /^$f/) {
   remove_stone($x + 1, $y, $f);
    }
    if ($x > 0 and $goban[$x - 1][$y] =~ /^$f/) {
   remove_stone($x - 1, $y, $f);
    }
}

# check_stone(x, y, color)
sub check_stone{
    my $x = $_[0];
    my $y = $_[1];
    my $f = $_[2];
    if (!liberties($x, $y, $f)) {
   remove_stone($x, $y, $f);
    }
}

# check_life(last_move_color, last_move_x, last_move_y)
sub check_life{
    my $f = $_[0];
    my $fm;
    my $x = $_[1];
    my $y = $_[2];
    if ($f eq $bc) {
   $fm = $wc;
    } elsif ($f eq $wc) {
   $fm = $bc;
    }
    if ($y < $lines - 1 and $goban[$x][$y + 1] =~ /^$fm/) {
   check_stone($x, $y + 1, $fm);
    }
    if ($y > 0 and $goban[$x][$y - 1] =~ /^$fm/) {
   check_stone($x, $y - 1, $fm);
    }
    if ($x < $lines - 1 and $goban[$x + 1][$y] =~ /^$fm/) {
   check_stone($x + 1, $y, $fm);
    }
    if ($x > 0 and $goban[$x - 1][$y] =~ /^$fm/) {
   check_stone($x - 1, $y, $fm);
    }
    check_stone($x, $y, $f);
}

# redraw()
sub redraw{
    my $s;

    $gb->Draw(primitive=>'rectangle', points=>"0,0 $width,$height", fill=>$bg);
    for ($i = 0; $i < $lines; $i++) {
   $ax = $xoffset + $i * $gridsize;
   $ay = $yoffset;
   $bx = $ax;
   $by = $yoffset + ($lines - 1) * $gridsize;
   $gb->Draw(primitive=>'line', points=>"$ax,$ay $bx,$by", stroke=>$lc, strokewidth=>$lw);
    }
    for ($i = 0; $i < $lines; $i++) {
   $ax = $xoffset;
   $ay = $yoffset + $i * $gridsize;
   $bx = $width - $xoffset;
   $by = $ay;
   $gb->Draw(primitive=>'line', points=>"$ax,$ay $bx,$by", stroke=>$lc, strokewidth=>$lw);
    }
    draw_hoshi(4, 4);
    draw_hoshi(4, 10);
    draw_hoshi(4, 16);
    draw_hoshi(10, 4);
    draw_hoshi(10, 10);
    draw_hoshi(10, 16);
    draw_hoshi(16, 4);
    draw_hoshi(16, 10);
    draw_hoshi(16, 16);
   
    for ($i = 0; $i < $lines; $i++) {
   for ($j = 0; $j < $lines; $j++) {
       if ($goban[$i][$j]) {
      @s = split(':', $goban[$i][$j]);
      draw_stone($s[0], $i, $j, $s[1], $s[2]);
       }
   }
    }
}


$f = $bc;

while (<>) {
    @sgf = split(';');
    foreach (@sgf) {
   if ($f) {
       redraw();
       $gb->Write($imgfile);
       system("feh --bg-center $imgfile");
       sleep($sleeptime);      
   }
   $f = 0;
   if (/\[[a-w]{2}\]/) {
       if (/^B\[/ or /^AB\[/) {
      $f = $bc;
       } elsif (/^W\[/ or /^AW\[/) {
      $f = $wc;
       }
       if ($f) {
      $xoff = rand($lw * 2) - $lw;
      $yoff = rand($lw * 2) - $lw;
      s/[^\[]*\[//;
      s/\].*//;
      @k = split('');
      $x = ord($k[0]) - ord('a');
      $y = ord($k[1]) - ord('a');
      $goban[$x][$y] = "$f:$xoff:$yoff";
      check_life($f, $x, $y);
       }
   }
    }
}