4 ms·
Ask HN: How would I go about implementing the algorithm from this paper?
Hey guys, I'm writing a drawing application and I thought it would fun and challenging to try and implement this (https://www.youtube.com/watch?v=EtfCenXsSgQ) algorithm.
Paper: http://research.microsoft.com/en-us/um/people/larryz/zitnicksiggraph2013.pdf
I've been trying all day to understand what the authors of the paper do under the heading 3.1. Up to that point I had a fairly clear idea of what they were doing and how they were doing it. Then I reached that point, trying to first understand it by rewriting it in my own words followed by implementing it.
However, I can't even rewrite it in my own words, I simply don't understand what they're doing. How would I go about understanding what they're doing so I can implement this algorithm myself? Do I need to study more math? Should I read other easier papers first? Get specific help with this problem?
Any advice is appreciated.
- Gladdyu 11y agoStarting out with reading the referenced papers would be a good start. But in essence, they are using a specific way of sampling from a large array of data. They take certain elements from the large array Theta_{c} (the stroke representation), but only those that match the equation 1. The selection criterion (eq 1) is of the form z(i) = z(i-1) + min(1,f(dtheta)), with the elements being picked from the large data array (j) being the rounded down version of z, which is just an implementation detail really and not that important for the algorithm as the 4.3434th (for example) element of a discrete array does not make sense. What it does is varying the distance between samples (z(i) - z(i-1)) based on the difference in orientation of the samples. If there is a sharp corner you would need more samples to properly describe this, in contrast to a straight line. This is the curvature they are talking about (the second derivative of position, or the first derivative of orientation: delta orientation). Have fun!
- azeirah 11y agoI see now how not knowing the notation used can be very disadvantageous, [z] = floor(z). Your explanation will probably help, I'll let you know when I made progress :p
- Gladdyu 11y agoI think you made a typo but get the gist, but the rounding functions are the square brackets with the top or bottom horizontal parts missing: http://en.wikipedia.org/wiki/Floor_and_ceiling_functions http://en.wikipedia.org/wiki/Floor_and_ceiling_functions [] would be array indexing (or ranges, for instance delta_{theta} e (math symbol, element of, but can't type that here) [0,pi] ) and {} are sets/tuples
- azeirah 11y agoYeah it's a typo, I'm not sure how to type braces with the top or bottom missing however :p