Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Inclination-based "sectors" #440

Open
ManDay opened this issue Feb 22, 2024 · 2 comments
Open

Idea: Inclination-based "sectors" #440

ManDay opened this issue Feb 22, 2024 · 2 comments

Comments

@ManDay
Copy link

ManDay commented Feb 22, 2024

Since #304 gained some momentum with @MaethorNaur and @flide being generally positive about the idea, I thought it would be best to split out the proposal which I made in #304 (comment) into a separate thread for discussion:

Do not infer the sector from where the circle was crossed into or out of, but rather from the inclination (the angle at which) the circle was crossed into or out of!

As stated:

While this wil not prevent accidental crossings into the circle (which seem semantically inevitable), it should help with correctly determining the sector (a 90° clustering is easily beyond the precision of any typical trajectory), thereby allowing for the circle to be made smaller and reducing the risk of accidentally crossing into it!

@ManDay
Copy link
Author

ManDay commented Feb 22, 2024

As a bit of undirected brainstorming: For stability (position measurement noise in high frequency touch events) the incident angle at the circle boundary should most likely be inferred from more than just the 2 last touch events.

The easiest and most straight-forward method would probably be taking an weighted average of the angles between the last point and several points before that. The further away the respective 2nd point, the more stable the inferred inclination -- but of course also less relevant. I'll try to come up with an implementation which is appropriately simple (and doesn't rely on maintaining a variable-length list of previous points, like this naive approach).

@ManDay
Copy link
Author

ManDay commented Aug 9, 2024

With several months of experience of using the adaptive ("dynamic") circle, I think I could develop a good grasp of where problems remain and what is needed to create a more reliable input experience, using the (so far unusused) inclination data. It should be mentioned that the following does not require a stabilization of the trajectory.

This is about how we detect the return into the circle from one of the sectors! By using inclination information, we should be able to prevent accidental returns into the circle.

"Traditonally", accidental returns into the circle by cutting across the circle prematurely, look something like this:

cut

Here, we accidentally returned from the upper sector into the circle. They occur when we don't take the time to perform a well rounded circle, but are too hasty. If they happen, too often, we so far have two knobs to turn to address this:

  1. We take greater care to fully go around the circle, which will cost us time and effort.
  2. We shrink the circle, which will demand greater precision to return into the circle.

Looking at the picture above, it is intuitively evident that the trajectory did not mean to return into the upper circle. That intuition comes from the fact that the trajectory did not aim towards the circle at that point; the inclination was too low, it went tangentially to the boundary.

Therefore, we should add a condition for the detection of the return from a given sector into the circle:

To count as a return from a sector into the circle, the trajectory must be pointing towards the circle center (i.e. the inclination be 90°) within an error of ±E, where E would typically be something like 45°.

inc

Here, the first crossing into the circle in the upper sector is ignored, because the trajectory/tangent (blue) does not lie within the permitted range (green triangle) around the ray into the circle center (green line). The second crossing from the left sector, however, is detected, because the inclination is sufficiently high.

Although we could, at this point, detect the "return into the circle" (i.e. termination of a sequence) without any notion of the circle, we will want to keep it around as an upper limit to inclination detection, so as to not fall off the other side of the problem, and accidentally detect termination from a steep inclination, like here:

toofar

However, we should still improve the rule to deal with reversal (a.k.a. "variants", "layers"), because those will, if accidentally performed within the diameter of the circle, trigger the inclination detection (either unstably or because the reversal turned towards the circle center):

A detection will occur, if the sufficient inclination (90 ± E) from a given point P traverses at least the following distance: max(exterior distance, reversal margin), where exterior distance is the distance of P from the circle boundary and reversal margin is a configured ratio of R the distance of P to the circle center, where R is typically something like 10%.

Concretely, we check the inclination at every touch/move event (coming from the last touch event). If it reaches 90 ± E, we set the "termination circle" to be of radius min(circle radius,touch radius * (1-R)). If the inclination leaves the 90 ± E region, we unset "the termination circle". If the "termination circle" is set and the trajectory moves into it, the sequence ends.

Comments and questions or so (in case this was too confusing) welcome!

PS: The part about traversal distance is what makes stabilization superfluous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant