-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO.txt
124 lines (116 loc) · 6.69 KB
/
TODO.txt
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
notes. I'm going to stop updating the numbers when I remove completed tasks, since it's a lot of work.
Also going to start prioritizing (short term priorities) Also a lot of repeats here, gonna start merging them
Total issues to address now: 24
Urgent: (0 total)
High: (5 total)
1. Improve stroking, particularly where Tiller-Hanson breaks down.
Primarily near loops/self intersections of cubic beziers and degenerate (i.e. linear)
quadratic/cubic beziers
2. Deal with cusps properly. Probably subdivide, figure out how to get tangents and normals at cusps, and
then cap the resulting join (if the tangents are antiparallel ofc). I suppose we could have a sharp point
that isn't a cusp. (Do math xD)
(More or less done,
but frankly, this doesn't work very well for handling the related problem of near cusps)
3. First draft documentation of code.
Progress
Done:
MathClasses,
Picture,
Polynomial,
PolynomialSolver,
Stroke,
Started:
Geometry.Bezier,
Undocumented:
Font,
Model,
Rasterizer,
Scanner,
Utils,
Geometry,
Geometry.Affine,
Geometry.BSpline,
Geometry.CommonPaths,
Geometry.Ellipse,
Geometry.Parametrized,
Geometry.Path,
Geometry.PathBuilder,
Geometry.PolyLine,
Geometry.Types,
4. Add a mechanism for adaptive subdivision to the rendering engine
(See 1 and 2)
5. Make rasterization more efficient.
- Possibly parallelize the scanning algorithm by computing the relevant intervals and using binary search
to figure out which interval you are in.
(This one definitely needs benchmarking to compare with current version, since having parallelized
rows ought to be enough to get all the practical benefits we can out of parallelism)
Alternatively, compute a 1D spline?
- use unboxed vectors where possible in the rasterization algorithm
- possibly try to update only pixels whose values change in each layer?
- Get rid of MSAA antialiasing, it adds about 20%-25% to code run time with very little benefit. (DONE)
- Related to previous point, perhaps improve the heuristic AA to minimize any loss in quality
6. Switch everything over to DFunctions
Hm. Is this good?
7. Create Evaluatable typeclass
(DONE)
Medium: (9 total)
1. Refactor the Path/Contour/ClosedPath abstraction.
ClosedPath isn't a great abstraction. Also it would be great to provide a more unified interface to
Path/Contours. It's nice to have a type level distinction between the concepts, but they also behave very
similarly for most things
2. Refactor everything. Like the path abstraction has gotten a bit complicated, since there are so many
different kinds of paths. Might want to just get rid of non-rational Bezier curves, since they are
entirely subsumed by rational Bezier curves
Possibly reimplement circular/elliptical arcs in terms of NURBS
Refactor the path abstraction. Need easier combination/building for paths, also converting geometric
objects into paths/pathSegments needs to be uniformized. Currently it's an absolute mess.
3. Implement more operations on paths and contours, e.g. rotation of contours
4. Massive refactor needed to remove code duplication everywhere.
also to reorganize the Module/File structure
Also remove/delete deprecated code stuffs
5. Add NURBS contours, i.e. a NURBS with domain the circle, it has the added benefit that
#knots = #control points, regardless of degree or anything, though it admittedly isn't clear how knots and
control points are directly related in this case. It's just that there are #knots rotations of any
continguous subset of the control points
6. Improve accuracy of bounding boxes computed for beziers/rational beziers
7. Allow negative weights (as long as it doesn't produce a weight of 0 on the interval) for
rational beziers/nurbs, and allow computation of their bounding boxes
8. Add arc length/arc length parametrization of paths.
(to implement stuff like dashing strokes and drawing markers etc)
(Computed exactly for quadratic Beziers. Adding approximation for Rational and or cubic beziers)
9. Add simple plotting engine (DONE)
Low: (10 total)
1. Write functions to generate paths out of primitives.
E.g. makeRoundRect Stuff -> Contour
Update: This has been started, but we need to add more shapes.
2. Make PathBuilder a Writer monad, so that we can use do notation to write paths, would be *super* elegent
to use. Or something. Writer doesn't *quite* work as I need.
3. Create composite objects out of contours and whatnot
What did I even mean by that? Oh perhaps something like the picture thing. Dunno.
4. Improve small scale rasterization (i.e. for fonts at low pixel sizes)
5. Add implicit polynomial (I mean polynomial in x) contours (i.e. the level set of a differentiable
function in x and y which is at most a cubic polynomial in x when y is fixed.)
Then we could solve for x, and also compute the normal to the contour at any given point (since we know the
gradient). Thus the scan rasterizer could rasterize such a contour. Need to be careful with how we define
orientation, but I think it could work. This would be a solution to 2 above, as well as being sooooo much
more general. Could do soooo much cool shit with this.
6. Related to ?. Add general parametric paths which are polynomial in y. Like fun fact, the scan rasterizer
doesn't give a shit what x is doing as long as we can solve for y, and take appropriate derivatives.
7. Possibly remove nonrational Bezier curves/NUBS in favor of rational Beziers/NURBS, might have to look into
whether/how much of a performance differnce there is/might be. See 20.
8. Add SVG loading/rendering
9. Glitch when stroking sharp interior bends, see Q with a stroke distance of 40.
10. Never compare floats for equality. This is a huge source of bugs. Just fixed one in the
build join function causing massive streaking and glitching. (Mostly done)
Don't do now:
1. Consider adding circular/elliptical contours as standalone contours not built out of path segments.
This right now is not a good idea, as it seems like it will only result in further code sprawl
2. Add biarcs, biarc fitting to types of paths? They're apparently a *lot* simpler for a lot of things,
in particular offset curves of biarc curves are biarc curves.
3. Fix font loading. Either edit FontyFruity to fix loading of certain fonts. Possibly the issue is properly
checking flags for on/off curve points.
Or write my own ttf loader. I will probably eventually write a ttf loader, since I will also want an otf
loader.
Uncategorized:
TL;DR:
Many minor tasks to do. Major refactor on the horizon. Should start documenting the code.