Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have a general question about creating a drawing application, the language cou

ID: 653143 • Letter: I

Question

I have a general question about creating a drawing application, the language could be C++ or ObjectiveC with OpenGL. I would like to hear what are the best methods and practices for storing strokes data. Think of the many iPad apps that allow you to draw with your finger (or a stylus) or any other similar function on a desktop app.

To summarize, the data structure must:

be highly responsive to the movement

store precise values (close in space / time)

usable for rendering the strokes with complex textures (textures based on the dynamic of the stroke etc)

exportable to a text file for saving/loading

Explanation / Answer

Regardless of the data structure you use it may be helpful to remove unneeded data points using an algorithm like the Ramer