Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: directional system: more magic code cleanups
Home

[Freeciv-Dev] Re: directional system: more magic code cleanups

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx, "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: directional system: more magic code cleanups
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Tue, 25 Sep 2001 14:27:04 +0100 (BST)

If you do not mind I will make a few comments about your discussion.

First of all, it is not as friendly as I think it should be.  I can feel
quite a lot of irritation, especially in Ross' emails.  I am sure it can
be avoided.

Second, the difference between Ross' and Raimar's algorithms is the
difference between 26.6 degrees and 22.5 degrees.  Not much is it?

Third, in the below example,
===============================================================
 --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> Ok. From a test game:
> 
> 2: src=(43,4) dest=50,7)
> 2:   orig=SE, jason=SE, ross=E, raimar=SE, raimar2=SE
> 
> So we see that diff_x=7 diff_y=3. So we have a gradient of
> m=diff_y/diff_x=3/7.
===============================================================
E is the more correct answer than SE.  The complicated explanation is
given in Ross' email about differences between trigonometry and
God-knows-what.  The simple explanation is provided by the attached
figure.  I hope you agree that the best division of the tiles of the 3rd
outer circle is the one drawn: each direction has 3 tiles.  If you carry
this division further, to the 7th circle, you will find that (7,3) is
East.

Four, since the difference is not so terribly crucial, one should go for
the fastest algorithm.  Which, as I understand from the profile, is
Ross'. But it looks like a cryptographer's nightmare.  I would not have
the brainpower to read such thing, unless it is really well commented.


Best,
G. the preacher.


> Did I expect that you find this error by yourself after pointing out
> that there are differences (I didn't say error here)? Yes.

You obviously fail to live up to our expectations, Ross ;)

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

GIF image


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