Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [PATCH] Formatting cleanup.
Home

[Freeciv-Dev] Re: [PATCH] Formatting cleanup.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Formatting cleanup.
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Tue, 09 Oct 2001 18:52:18 -0400
Reply-to: jdorje@xxxxxxxxxxxx

Gaute B Strokkenes wrote:
> 
> On Sun, 07 Oct 2001, vze2zq63@xxxxxxxxxxx wrote:
> > Gaute B Strokkenes wrote:
> >
> >> The current underlying assumption is that two coordinate pairs are
> >> considered to be the same if and only if their difference (as
> >> vectors of the Z-module ZxZ) can be expressed as a linear
> >> combination of a given set of vectors.
> >
> > Assumption?  Where?  I know you are assuming this, but can you
> > please point out where the code uses this?

[snip mathematical argument]

You have just proven [1] that given this assumption, things work as you
say they do.  The topology I described before [2] obviously does not fit
this assumption, so if we implement things that way it wouldn't work
out.

I have not made this assumption, and I don't know of anywhere in the
code (outside of the GUI code, which needs fixing in any case IMO [3])
that does.

> I have already spent more time than I like on (from my perspective)
> fruitless and uninteresting discussions about topology and
> normalisation, and unless you can offer some earth-shattering new
> insight I am reluctant to spend any more of the very limited time that
> I have available to work on Freeciv to discuss this.  However, if
> you're interested in the (relatively straightforward) mathematics I've
> used in my arguments then I'm happy to provide references.

No, I understand the math.  I'm just saying we don't have to do it that
way.


[1] Well, only a lazy mathematician's proof.  But I agree with you.

[2] The topology was (a larger version of)
     ^
     |
<- X X

Obviously it does not fit the linear-combination assumption; in fact
there are exactly 4 elements of each equivalency class of map positions
(or 4 "worlds"):

X X X
X   X
X X X

[3] Actually it assumes something slightly different but related.  For
instance there is code like

/* (x0, y0) is corner of drawing canvas */
/* (width, height) are dimensions of drawing canvas */
for (dx=0; dx<width; dx++)
  for (dy=0; dy<height; dy++) {
    dx2=dx, dy2=dy;
    wrap(&dx2, &dy2);
    draw_tile(x0+dx2, y0+dy2);
  }

Here the code is assuming wrapping is independent from realness (which
is true if all equivalency classes are just sets of elements that differ
by defined linear combinations).  This is done in part to avoid
wrap-around on the screen (though why it was done this way is beyond
me).  If you look at this code long enough, I think you'll become very
confused as to how it works at all.


jason


[Prev in Thread] Current Thread [Next in Thread]