chiark / gitweb /
Improve the algorithm for figuring out where the number should be
authorSimon Tatham <anakin@pobox.com>
Sat, 2 Apr 2011 15:19:29 +0000 (15:19 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 2 Apr 2011 15:19:29 +0000 (15:19 +0000)
commit3c26b651a690ae35879afeaae1a1ab831ddbfd63
tree666937bddbe2f4dedef75f456b38b8acb0085f76
parent86f3385d3d669e5561b3c5f272e8695e496da0cf
Improve the algorithm for figuring out where the number should be
drawn in a face: averaging the vertex positions works fine for regular
or roughly regular convex polygons, but it'll start being a pain for
odder or concave ones.

This is a kludgey brute-force algorithm; I have ideas about more
elegant ways of doing this job, but they're more fiddly, so I thought
I'd start with something that basically worked.

[originally from svn r9137]
loopy.c