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: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: directional system: more magic code cleanups
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Sep 2001 10:23:51 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Sep 26, 2001 at 12:36:19AM -0400, Ross W. Wetmore wrote:
> At 10:19 AM 01/09/25 +0200, Raimar Falke wrote:
> >On Tue, Sep 25, 2001 at 03:11:26AM -0400, Ross W. Wetmore wrote:
> >> At 09:12 AM 01/09/24 +0200, Raimar Falke wrote:
> >Ok. However every piece of code which will get into cvs will be
> >reformatted.
> 
> You obfuscated by you, right?

Indent.

> >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.
> >
> >Now comes the tricky part where your error is: which gradient is the
> >border between the SE part and the E part? I think your answer would
> >be 0.5. Probably because m=1 divides the quadrant. And 1/2 would
> >quarter the quadrant. THIS IS WRONG. The correct gradient is
> >tan(pi/8)=0.4142... It is now no surprise that the gradient from above
> >m=3/7=0.42857... is between 0.4142 and 0.5.
> 
> Raimar LOOK AT your numbers. You need to move 7 east and 3 south. It
> should be clear as mud that the straightest direction looks like this
> with the first move to the EAST.
> 
>  0 1 . . . . . .
>  . . 2 3 . . . .
>  . . . . 4 5 . .
>  . . . . . . 6 7
> 
> Your trig functions are clearly a bit out of whack. Do you know why?


Doing the example with pencil and paper:

  0 . . . . . . .
  . 1 2 3 . . . .
  . . . . 4 5 . .
  . . . . . . 6 7

But why is your solution better? Because it is symmetrical?

> I hope you come up with a new version that agrees with mine, or stop
> this nonsense and just admit that you hasve a bit more to learn in
> some things, and pay attention when people tell you something.

Yes it may be difficult to work with me but I have to understand
it. But I feel I'm really close now. Have some patience.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Make a software that is foolproof, and only fools will want to use it.


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