News for hackers. Stuff that matters.
Re:Ask HN: Anyone Have Expertise in Trigonometry? by pubby on Monday September 19, 2022 @08:08PM (#32905893)
If you can't figure it out, memoize the results in a table and interpolate.
Re:Ask HN: Anyone Have Expertise in Trigonometry? by thomassmith65 on Monday September 19, 2022 @08:45PM (#32906194)
I'd start by running the table through a curve-fitting program to see if it finds a simple formula like the OP is seeking. I've used this paid app https://www.curveexpert.net/products/curveexpert-professiona... but there are also free curve-fitting web apps out there.
Re:Ask HN: Anyone Have Expertise in Trigonometry? by clumsycomputer on Monday September 19, 2022 @08:52PM (#32906247)
awesome thanks for the recommendation

my only worry about curve fitting is that the recommended function won't generalize to other loop configurations

Re:Ask HN: Anyone Have Expertise in Trigonometry? by thomassmith65 on Monday September 19, 2022 @11:54PM (#32907478)
I'm admittedly hazy on the exact work you're doing, but if you mean the other configurations will change the curve, you could try (1) tweaking your program to output tables of a few examples (2) using curve-fitting app to get a fit for each table (3) looking if it found an equation that matched all of them (making a note, for each example, of which coefficients it plugged into the equation).
Re:Ask HN: Anyone Have Expertise in Trigonometry? by clumsycomputer on Tuesday September 20, 2022 @09:49AM (#32911631)
that sounds like something i haven't tried and may yield results

gracias

Re:Ask HN: Anyone Have Expertise in Trigonometry? by clumsycomputer on Monday September 19, 2022 @08:16PM (#32905956)
i have an implementation that does something along those lines, which suffices for graphics but doesn't work well for audio applications. think 48 000 samples per second.

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