Problem 1: Rectangle Merging
-
Q1: [2001/05/03]
請問 Task 2 Output的格式要如何決定呢?
範例中是從上到下切割,但要求中好像沒提到一定要由上到下切割?
另外如果不切割,直接Output原來矩形出來可以嗎?這樣的話應該所有人的Output格式就一定一樣了吧
A1: [2001/05/09]
Please see the last sentence of Section I, "... the second task of your program is
to..., and then to obtain a *horizontal* trapezoidalization for each polygon."
That is, as shown in the sample output, the final polygon is horizontally cut
into a set of rectangles.
-
Q2: [2001/05/30]
問題一:請問p1-16.dat和p1-17.dat應該如何切割?要產生多少個Rectangles?
問題二:如果上下二個Rectangles的左右二個x座標均一模一樣的話,是否要合併成一個呢?
註:p1-16.dat,p1-17.dat為參賽者所提供之測試檔。
A2: [2001/06/01]
Here are the answers provided by Avant! and Richard Guo (2001/06/04).
A1:
The criteria to cut polygon is "Horizontal Trapezoidation".
For test1(p1-16.dat), it will be cut into the following 3 rectangles,
1
3
0 30 50 100
100 30 150 80
0 0 150 30
And, the result of test2(p1-17.dat) is
1
5
0 30 40 40
0 20 60 30
40 -20 60 20
0 -20 10 20
20 -20 30 20
A2:
Yes. The cutting is according to the points after polygon merging.
If two rectangles have the same left and right boundaries, they should be merge into one.
For any questions, send e-mails to cad@cis.nctu.edu.tw.
Last modified: June 2, 2001