adamwulf / loose-leaf

Intuitive note taking app. Import and annotate PDFs, manipulate imported photos with intuitive gestures, and take notes with Apple Pencil.
https://getlooseleaf.com
MIT License
621 stars 95 forks source link

moving the pen/eraser really slow makes a splotchy line #147

Open adamwulf opened 11 years ago

adamwulf commented 11 years ago
  1. draw pen very slow
  2. draw eraser very slow
  3. both are very splotchy for their sizes.

i should smooth the sizes much slower over small distances and force small distances to have small changes in size. otherwise even a small adjustment in size will look very blocky

adamwulf commented 11 years ago

i did a quick edit to try an idea, and maybe it would work with more finesse

  1. calculate the new velocity for a stroke
  2. calculate the difference in velocity from the previous stroke
  3. calculate the distance between the previous point and new point
  4. calculate the velocity change / distance
  5. allow a max of ~ 2% velocity change per pt

that did sorta ok, but i also noticed that velocity maxed out very soon for the eraser. i may need to adjust both the min/max velocity and the min/max accel for the pen vs eraser

adamwulf commented 10 years ago

could also:

  1. calculate the last few points and merge into single smoother bezier path
  2. undo the last very short stroke
  3. new stroke with the slightly longer an smoother curve