Index query in angle rotation

Revision en2, by TuanGe, 2021-08-14 05:04:45

Meet a problem, but can't find solutions on internet. I know here are smartest people, so hope can get some help.

The problem is, starting from 0 degree, we rotate theta every time, theta is a floating point, like 33.7 degree. So now we have an array of angle [0, theta, 2*theta, ...] (wrap to [0..2*PI]).

And we are given an start index a and end index b, how can we quickly find all indices in [a..b] whose angle fall into angel range [t1..t2] (the blue area)?

Really thanks for any idea, I can only think out iterating all indices one by one.

Tags #geometry, #range query

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English TuanGe 2021-08-14 20:29:07 29 Tiny change: 'lue area)?\n\nReally' -> 'lue area)? There could be many queries.\n\nReally'
en4 English TuanGe 2021-08-14 08:27:24 35
en3 English TuanGe 2021-08-14 05:05:01 0 (published)
en2 English TuanGe 2021-08-14 05:04:45 354 Tiny change: 'e area)?\n![ ](/pr' -> 'e area)?\n\n![ ](/pr'
en1 English TuanGe 2021-08-14 04:57:39 318 Initial revision (saved to drafts)