Hacker News new | ask | show | jobs
by Joeri 3976 days ago
One of my first professional challenges was porting a CAD viewer to flash. The hardest part was figuring out how to convert ellipse sections and AutoCAD bulge arcs (line + bulge factor) to quadratic bezier curves. That one took three weeks of figuring out the math (starting from near zero because i hadn't paid much attention during school). I only completed the task through sheer stubbornness, because there were whole days where I made no progress at all.
1 comments

Genuinly curious: I thought you can't represent ellipses with bezier curves, at least accurately... What did you do?
Cut it into sections smaller than pi/2, then approximated. Looked close enough to the naked eye that nobody complained.