[Home] [Groups] - Message: [Prev in Group] [Next in Group]
22972: Re: [MUD-Dev] Breaking down the walls
[Full Header] [Plain Text]
From: Hans-Henrik Staerfeldt <hhs@cbs.dtu.dk>
Newsgroups: nu.kanga.list.mud-dev
Date: Fri, 14 Jun 2002 13:10:47 +0200 (MDT)
References: [1]
Organization: Kanga.Nu
On Thu, 13 Jun 2002, David B. Held wrote:
> From: "Brian Lindahl" <lindahlb@hotmail.com>
> So my speed hack was: don't use unrestricted polygons. Instead, I
> use rectangles. "Rectangles???" you say? Yup. Only instead of
> just rectangles, they are really paired triangles forming a
> rectangle. Each corner of the rectangle has its own elevation,
> and you specify which orientation the two triangles have. This
> has the effect that you can cover any polygonal shape, but it
> might require more than one tile. To form a diamond, for
> instance, requires four tiles. The upshot is that you now have a
> rectilinear graph which vastly simplifies all kinds of space
> calculations, and provides a relatively fast way to do coordinate
> searching and other stuff. The constraints allow you to make
> various optimizing assumptions (like where to expect connecting
> tiles, etc.). The system isn't complete, or perfect, but it's
> certainly interesting, and I will need more time with it to decide
> whether it works the way I want it to.
I implemented circles-only. The question is wether the _exact_ shape
makes much difference in a textually rendered environment. If i
wanted to make computational shortcuts and implement general
polygons i would circumscribe them with a circle and then only test
the polygon if the circle contained the point.
(code available on request)
Hans Henrik Stærfeldt | bombman@diku.dk | work: hhs@cbs.dtu.dk |
Address: |___ +45 40383492 __|__ +45 45252471 __|
DTU, Kemitorvet, | Scientific programmer at Center for Biological |
bygn 208, CBS. | Sequence Analysis, Technical University of Denmark|
_______________________________________________
MUD-Dev mailing list
MUD-Dev@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev