w3c / touch-events

https://w3c.github.io/touch-events/
26 stars 24 forks source link

rotationAngle range of 0-90 seems counterintuitive - add a diagram? #53

Closed patrickhlauke closed 7 years ago

patrickhlauke commented 8 years ago

Maybe it's my own failing, but for the longest time I kept thinking that rotationAngle must be 0-180 degrees, rather than 0-90. Intuitively, it seems that if i place a thumb on a screen pointing to 9 o'clock, and rotate it clockwise to 3 o'clock, it should go from 0-180 (for the rest of the full rotation, from 3 to 9 o'clock clockwise, i can sort of understand how the shape of the ellipse is effectively mirrored/flipped from the previous one).

Observing actual values on my Nexus 10, the one bit that seemed to be missing from the spec was the fact that starting at 9 o'clock, as i proceed towards 12 o'clock, rotationAngle grows from 0 to 90, and then at 12 o'clock radiusX and radiusY "flip" (what was radiusX before becomes radiusY, and vice versa), and now the rotationAngle is at 90 and proceeds to 0 as i get towards 3 o'clock.

I wonder if some form of diagram, and some additional explanation for radiusX/radiusY, may be necessary here.

RByers commented 8 years ago

Sure, more clarity is always good. It's a pretty niche scenario though (with little device support) so not a great use of our time IMHO. /cc @mustaqahmed

mustaqahmed commented 8 years ago

If the angle interval was [0,180) instead of [0,90), every ellipse (radiusX, radiusY, rotationAngle) = (a, b, theta), where a!=b and 0<=theta<90, would have another valid representation: (b, a, theta+90). Then any use-case that needs unique representations would have to compute a canonical one.

We shouldn't add a diagram for the what-if-180-degree case for sure. I think we can simply add the following text in the description of rotationAngle: "The angle interval [0,90) guarantees that any non-circular ellipse is represented by a unique tuple (radiusX, radiusY, rotationAngle)."

patrickhlauke commented 8 years ago

not sure that "represented by a unique tuple" means anything to mere mortals though, without further explanation. in particular, things like the "flipping" of what radiusX and radiusY when you cross over the 12 o'clock mark for instance (and, although i've not tested, presumably the 3, 6 and 9 o'clock mark as well)...

or, we simply keep it cryptic for now in the assumption that not many devices will actually support it, so it'll become more of an irrelevant curiosity/oddity...

patrickhlauke commented 7 years ago

as usage / actual devices that truly support this is (to my knowledge) quite low, happy to just close this...