I would be inclined to use a non-linear solver, which will will almost certainly converage within 2 or 3 iterations especially if you're starting with a good initial estimate from time=t-1. 40khz should not be a problem.
You can start with scipy.optimize, and look into ceres if you need something faster.
i don't have much formal math training, but have used scipy a handful to times successfully for other problems. optimize is new to me, but ill throw some things into and see what comes out
I prefer the lazy approach :) . The only hard step is 5B. How are you computing the intersection? Are you using a linear search in the angle? Can you use binary search? Probably the secant method is faster https://en.wikipedia.org/wiki/Secant_method but binary search is more foolproof.
linear search in angle i believe, though depending on the use case i hold onto the index of the last matched point making the next search O(1)
thanks for introducing me to the secant method. at the very least it will help me think about it differently
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)
5. compute the trace point at trace angle (white) its a generalization of the drawing by Fritz Hügelschäffer linked belowhttp://www.mathematische-basteleien.de/eggcurves.htm#:~:text....