Magic Mailing List |
|
From: Jeff W. Sondeen (sondeen AT rcf-fs DOT usc.edu) Date: Fri Oct 27 2000 - 18:16:04 EDT
R. Timothy Edwards writes: > 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 > thanks, Timothy, for the diagram, now i see what you're talking about. great idea! one problem will be the large number of tiles that an angled shape will take. if i draw a 1000 x 2 poly line horizontally it will take only 1 tile (but of course gets split as you mentioned when other tiles are created within the same x-span). however, a 1000 x 2 poly at a 45 degree angle will itself create 707 (1000*cos(45)=707) tiles (one for each lambda in y) (just like when you cifin a rotated line, it gets stairstepped into staggered tiles - one every lambda). and magic gets pretty sluggish once you hit a few thousand boxes. but i guess that will be the price for rotations? /jeff > 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
|
|