17 points · by clumsycomputer · 4y ago · 20 comments
im looking to collaborate with someone who is passionate about trigonometry, computational geometry, or just math in general! im trying to figure out if the white dot in the animation linked below can be computed in constant time, and if not what is the best that can be done? all the code i write these days is open-source, and i believe cracking this nut will go a long way for many!! any takers??
loop anatomy animation:
https://youtube.com/shorts/M83QFzrcnlc?feature=share
some additional context.
im constructing the loop (yellow) with the black dots, which im computing in constant time. the dynamic circle (blue) is being constructed from the two static circles (pink, orange). the white dot is currently being computed by sweeping the already computed loop points from the center of the small circle (pink).
are there any laws or key points that may help me along? are there any similar problems that are well documented that you are aware of?
thanks
Do you have a formula for each of these things?
What do you mean by "constant time"? From your description it seams all the points have a closed formula, there are no iterative steps that may be long? Do you want a simpler direct formula?
the animation is something i constructed in order to help facilitate discussion and get help :)
i've outlined the computations more detail in a reply below
by constant time i mean O(1)
computing the white dot currently requires me to sweep the already computed loop points which isn't a big deal in a lot of use cases, but with audio its a show stopper
the white dot is also the key to a much more complex computation that im using
1. define the base circle (orange)
2. define the sub circle (pink)
3. compute the range of the intersection circle's radius (blue)
4. compute the loop points (yellow)
4A. compute intersection circle along range defined in 3
4B. compute the intersection angle between base and intersection circles relative to the center of the intersection/sub circle (law of cosines)
4C. compute the intersection point with intersection angle (green on blue & orange)
4D. compute sub point with intersection angle (green on pink)
4E. compute the loop point with the x component from intersection point (4C) and the y component from sub point (4D)
5. compute the trace point at trace angle (white) 5A. trace the already computed loop points searching for the the two points where the trace angle fits between
5B. compute the intersection between the line composed of the two matching loop points and the trace line originating at the sub circle's center with an angle of the trace angle
its a generalization of the drawing by Fritz Hügelschäffer linked belowhttp://www.mathematische-basteleien.de/eggcurves.htm#:~:text....
my only worry about curve fitting is that the recommended function won't generalize to other loop configurations
the computation i've outlined in the animation is also just a small but very important piece of a much more complex computation
this white dot is my bottle neck