Life In 19x19
http://www.lifein19x19.com/

Go wallpapers
http://www.lifein19x19.com/viewtopic.php?f=10&t=8716
Page 1 of 1

Author:  Shedal [ Sun Jul 14, 2013 3:53 am ]
Post subject:  Go wallpapers

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

Author:  wineandgolover [ Sun Jul 14, 2013 3:59 am ]
Post subject:  Re: Go wallpapers

Very nice!

Any chance for iPhone proportions?

Author:  Shedal [ Sun Jul 14, 2013 4:02 am ]
Post subject:  Re: Go wallpapers

wineandgolover wrote:
Very nice!

Any chance for iPhone proportions?

Thanks!

Which iPhone? They have different screen proportions.

Author:  wineandgolover [ Sun Jul 14, 2013 7:12 am ]
Post subject:  Re: Go wallpapers

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:

Author:  Shedal [ Sun Jul 14, 2013 7:42 am ]
Post subject:  Re: Go wallpapers

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

Author:  wineandgolover [ Sun Jul 14, 2013 7:48 am ]
Post subject:  Re: Go wallpapers

Applied. Thanks!

Author:  Martin1974 [ Sun Jul 14, 2013 3:03 pm ]
Post subject:  Re: Go wallpapers

Very nice! Thanks!

Author:  EdLee [ Sun Jul 14, 2013 3:25 pm ]
Post subject: 

Hi Shedal, thanks. Which camera did you use for those photos ? :)

Author:  Shedal [ Sun Jul 14, 2013 3:27 pm ]
Post subject:  Re:

EdLee wrote:
Which camera did you use for those photos ? :)

Nikon D90 and Nikon D800.

Author:  AKaios [ Tue Aug 06, 2013 8:35 pm ]
Post subject:  Re: Go wallpapers

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!

Author:  pobe [ Tue Aug 13, 2013 10:59 am ]
Post subject:  Re: Go wallpapers

I took this with my iPhone (4). Looks good enough for a phone background, imho... :)

Image
Go wallpaper by pobe, on Flickr

Author:  pobe [ Wed Aug 14, 2013 2:50 am ]
Post subject:  Re: Go wallpapers

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

Author:  pobe [ Fri Jul 04, 2014 11:52 pm ]
Post subject:  Go wallpapers

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

Author:  Redbeard [ Sat Jul 05, 2014 2:32 pm ]
Post subject:  Re: Go wallpapers

Cool! Care to share the script?

Author:  pobe [ Sun Jul 06, 2014 12:32 am ]
Post subject:  Re: Go wallpapers

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:
#!/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);
       }
   }
    }
}

Author:  RBerenguel [ Sun Jul 06, 2014 1:11 am ]
Post subject:  Re: Go wallpapers

May I point to sgfutils?

Author:  pobe [ Sun Jul 06, 2014 1:27 am ]
Post subject:  Re: Go wallpapers

Yes, one could probably script sgftopng to do the same thing better... :)

Author:  RBerenguel [ Sun Jul 06, 2014 1:32 am ]
Post subject:  Re: Go wallpapers

Yup, I have done it several times. Adding sgfx or sgfinfo (to know how long the game is) sgftopng can be used for many funny things (I have animated gifs of tsumego and games, for fun.)

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/