Magic Mailing List |
|
From: R. Timothy Edwards (tim AT stravinsky DOT jhuapl.edu) Date: Thu Oct 26 2000 - 22:11:13 EDT
Yes, Rajit has the right idea, and I *think* that I convinced myself that traversal and painting would be more-or-less trivial to implement (insofar as wading through the tiling code in magic can be called "trivial"). I worked out some design rules on paper, and decided that no more than one extra rule would be necessary. One reason is that as far as I know, acute angles are always illegal, so diagonal tiles would be restricted to the following format: | A | | | ---+----+--- | A /| | / | A | / | B |/ B | ---+----+--- | | | B | C So a tile can only be diagonal if the tiles on its two right- angled edges are the same layer type, and then the diagonal tile derives its layer type from those neighboring layers. In general, diagonal tile "A" satisfies all DRC rules when the whole tile satisfies the design rules if the whole tile were type "A". The extra rule would check if layer "B" satisfies its width rule between layers "C" and "A" (i.e., calculates the minimum distance between the corner and the diagonal). The tile has a layer type called "diagonal", and the two layers are determined when necessary for rendering, drc, splitting, combining, etc. That way, the tile structure does not need to be changed; the tile does not need to record what two tile types are on either side of the diagonal cut, and it does not need to record which two corners the diagonal line cuts. Rules for splitting and combining tiles require some experimenting to determine what appears to be most "natural" while doing layout, but can be done in a fairly straightforward way. Generally, I had the idea that a diagonal tile could only be created if layers "A" and "B" would satisfy the requirements stated above; if splitting and combining causes the requirements not to be satisfied, the tile goes back to being a normal rectangular tile. Naturally, I have not thoroughly worked this out, so anyone who sees insurmountable logical fallacies with my idea is welcome to point them out. ---Tim
|
|