1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
Polygon:
Store list of edges, sorted Y, then X
Init (x, y, width, height)
- should add all interesting edges to a global edge table
(can this just be a pointer? No, because we need to change them,
and we need auxiliary data)
The GET should be of unions of (x0, y0, x1, y1) and the edge
structure. The edge structures should only be initialized when
they are actually needed.
Also add this time, the edges are transformed if the image has
a transformation.
- Add pointers to active edges to local edge table
Can the local edge table simply be a pointer into the global edge table?
Yes, although, the edge structures may be too large. Can we simply link
them together? Then we could merge sort them.
Rendering scanline
- step all the edges, emitting points
keep track of:
- the first edge that ends up being out of order
- whether all active edges are vertical
if an edge dies, unlink it from the AET.
- sort again
- Write simple floating point based line walker
- Make the sample grid is non-uniform.
- Make sure it still works.
- Generate tons of test data. Set up automatic verification.
- Optimize it
- track errors
- eliminate divisions
- etc.
- Make fix point version.
|