4 ms·
Since the fine article mentioned displaying a cosine wave as the goal, I would also suggest that people in a similar situation might consider the Minsky algorit
by cardiffspaceman 6y ago
Since the fine article mentioned displaying a cosine wave as the goal, I would also suggest that people in a similar situation might consider the Minsky algorithm for circle drawing, which generates points around the circle. You can then take one of the coordinates and use it as the amplitude of a sine wave. Minsky's algorithm is discussed on this site [1] and in great detail, as one of the members of the family of DDA algorithms here [2] The two citations converge in that the HN discussion discusses the circle as a solution of a differential equation, e.g. this comment [3]
[1] https://news.ycombinator.com/item?id=15266331 https://news.ycombinator.com/item?id=15266331
[2] https://www.hindawi.com/journals/mse/2014/916539/ https://www.hindawi.com/journals/mse/2014/916539/
[3] https://news.ycombinator.com/item?id=15268477 https://news.ycombinator.com/item?id=15268477