Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: (PR#6721) A Quincuncial topology
Home

[Freeciv-Dev] Re: (PR#6721) A Quincuncial topology

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mburda@xxxxxxxxx, rt-guest@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6721) A Quincuncial topology
From: "rwetmore@xxxxxxxxxxxx" <rt@xxxxxxxxxxx>
Date: Thu, 6 Nov 2003 09:38:51 -0800

I haven't seen the actual implementation, but I suspect your comments are
a result of trying to do things the hard way as usual.

In the case of a Mobius strip, there is a representation that is just a
double size regular map. The only time you would need to consider the
extra vector stuff is if you went over the upper edge and landed on the
other side, or went through the map. I don't think these are normal
movement directions though, so not of greeat concern.

The same kind of representation selection will make all your complexities
vanish as well, as opposed to thinking about things in just a single a poor
representation because is the first to come to mind.

So with the right way of managing quincuncial coordinates, the current
code is proabaly not perturbed too much at all.

Cheers,
RossW
=====

Jason Short wrote:
> rt@xxxxxxxxxxx wrote:
> 
>>My first question is: what is a quincuncial topology?  A little research
>>turns up
>>http://www.mapleapps.com/categories/data_analysis_stats/maplemaps/html/pierce1.html
>>but I don't think that's what you're talking about (since it involves no
>>wrapping).
> 
> 
> OK, after re-reading the doc several more times I think I have it.
> 
> This change is not just a matter of making a few changes to map.[ch]. 
> It will take substantial changes throughout the code.
> 
> That said, I'm not opposed to this kind of change and I've had it in 
> mind all along (although IIRC Gaute had dismissed it as infeasible). 
> Some time ago we discussed having a mobius strip or a klein bottle for a 
> topology, and this requires many of the same concepts.
> 
> The main concept is that _directions_ (and vectors) have to be 
> normalized, just like map positions.  For instance with an 80x40 
> quinciux (as you describe it) going north from (0,0) puts you at (0,-1) 
> which normalizes to (79,0).  But the reverse of the direction must also 
> be normalized along the way so that you normalize (0,-1,SOUTH) to 
> (79,0,NORTH).  Basically we'd need a normalize_map_dir(x,y,dir) and more 
> generally a normalize_map_vector(x,y,dx,dy).  Quite a bit of work.
> 
> Other changes may be required in a few places, e.g., things that 
> currently use map_distance_vector.  Not sure about that.
> 
> I'd suggest you try to get a fully working implementation patch (so 
> you'll run into all the problems along the way and we can work them 
> out).  Make sure it applies to HEAD cvs, not 1.14.  Or have you already 
> done this, and I just haven't seen it?
> 
> jason
> 
> 
> 
> 




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