A
A
Alexey Kureev2014-06-13 16:27:07
JavaScript
Alexey Kureev, 2014-06-13 16:27:07

How to write a mathematical formula for determining the thickness of a line that changes depending on the speed of the mouse/finger movement?

As you can see from the title, I'm interested in the formula (and any considerations) on how to change the thickness of the line drawn on canvas, depending on the speed of moving the mouse / finger pointer.
My task is to create a system for drawing on canvas. The implementation of the drawing mechanism itself does not cause problems for me, only the mechanism for determining the line thickness is interesting.
It would also be interesting how to implement a brush a la "marker" (depending on the direction of the mouse movement vector, the thickness varies).

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question