Life In 19x19 http://prod.lifein19x19.com/ |
|
Diagram difference with SL http://prod.lifein19x19.com/viewtopic.php?f=14&t=8156 |
Page 1 of 1 |
Author: | HermanHiddema [ Thu Mar 28, 2013 5:23 am ] |
Post subject: | Diagram difference with SL |
While developing my diagram builder, I noticed that Life in 19x19 renders handicap points differently than Sensei's Library. Some more research shows that this is related to how circles are drawn. Here's how L19 renders Here's how SL renders: ![]() The handicap point difference is the most noticable, but actually all circle shapes, including stone outlines, are slightly different. Handicap points, for example, are made by drawing three concentric circles with diameter 6,5 and 4. Here's the pixels SL chooses: ![]() which are these: And here's the pixels L19 chooses: which are these: This isn't really important, of course, either result is understandable by the readers. I like the SL result slightly better, as it seems strange to have empty space inside handicap points ![]() I think this is caused by how PHP's ImageArc function decides on which pixels to draw. Whereas the SL version of PHP seems to choose the closest lower pixel by distance, L19's PHP version seems to just choose the closest. E.g. with a circle of diameter 6, so radius 3, which Y corresponds to X=1 given pythagoras' X2 + Y2 = Z2? There are two candidates: Y=2 gives sqrt(12 + 22) = sqrt(5) = 2.236. Y=3 gives sqrt(12 + 32) = sqrt(10) = 3.162. SL's version of PHP chooses Y=2 (closest value not over 3), whereas L19's PHP chooses Y=3 (closest value). I thought I'd document it here in case people wonder why the diagrams they get here look slightly different than the ones that my diagram builder seems to promise ![]() |
Author: | EdLee [ Fri Mar 29, 2013 11:56 pm ] |
Post subject: | |
HermanHiddema wrote: sqrt(10) = 3.162. SL's version of PHP chooses Y=2 (closest value not over 3) But 3 is the "closest value not over 3", is it not?Unless by "not over 3" you mean "not equal to 3 or over," which means "less than 3" ? |
Author: | HermanHiddema [ Sat Mar 30, 2013 2:24 am ] |
Post subject: | Re: |
EdLee wrote: HermanHiddema wrote: sqrt(10) = 3.162. SL's version of PHP chooses Y=2 (closest value not over 3) But 3 is the "closest value not over 3", is it not?Unless by "not over 3" you mean "not equal to 3 or over," which means "less than 3" ? I meant the closest value where the result of sqrt(X2 + Y2) is not over three. |
Page 1 of 1 | All times are UTC - 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |