Index query in angle rotation

Правка en5, от TuanGe, 2021-08-14 20:29:07

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 with length of n, r = [0, theta, 2*theta, ..., (n-1)*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)? There could be many queries.

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

Теги #geometry, #range query

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский TuanGe 2021-08-14 20:29:07 29 Tiny change: 'lue area)?\n\nReally' -> 'lue area)? There could be many queries.\n\nReally'
en4 Английский TuanGe 2021-08-14 08:27:24 35
en3 Английский TuanGe 2021-08-14 05:05:01 0 (published)
en2 Английский TuanGe 2021-08-14 05:04:45 354 Tiny change: 'e area)?\n![ ](/pr' -> 'e area)?\n\n![ ](/pr'
en1 Английский TuanGe 2021-08-14 04:57:39 318 Initial revision (saved to drafts)