6 ms·
Show HN: Interactive polynomial roots toy
- raverbashing 9y agoFor those curious what practical usage this might have, there is a control technique that uses the position of roots to determine how a system will behave as the feedback gain is changed https://en.wikipedia.org/wiki/Root_locus https://en.wikipedia.org/wiki/Root_locus Or basically, how loud can you crank an amplifier before you hear feedback (and how does it behave with different levels of feedback)
- ttoinou 9y agoVery cool to see one graph moving when changing the other graph. I must find a way to make cools fractals with that concept
- Strilanc 9y agoIf you restrict the possible coefficients, and limit the maximum degree, you get interesting fractal patterns: https://johncarlosbaez.wordpress.com/2011/12/11/the-beauty-of-roots/ https://johncarlosbaez.wordpress.com/2011/12/11/the-beauty-o...
- anigbrowl 9y agoThis is unreasonably enjoyable. Would also make a great musical toy...
- BucketSort 9y agoThis is GREAT! Reminds me of the http://explorabl.es/ http://explorabl.es/ project. The library it links to is very cool as well - http://jsxgraph.uni-bayreuth.de/wp/ http://jsxgraph.uni-bayreuth.de/wp/
- lancebeet 9y agoCool, really enjoyable to play around with. This made me notice a cute (probably trivial) phenomenon that I haven't seen before. If you take x^n+...+1 and move one of the roots to 1 (equivalently, divide x^(n+1)-1 by (x-z) where z is some nth root of unity), then the resulting polynomial's coefficients seem to be the nth roots of unity. By the way, it doesn't seem to prevent you from entering a degree higher than 7 if you enter the number manually even though it gives off a warning. Not sure if this is intentional.
- duetosymmetry 9y agoI wanted to keep the UI from getting too busy, which is why I limited the degree to 7. But if somebody really wants to play with higher-degree polynomials, I'm not going to stop them!
- Aditya_Garg 9y agoCould you open source the code? I think this tool would be really helpful for one of my professors in explaining gain margin for feedback systems.
- duetosymmetry 9y agoHi, yes, it's open source. My web site's github repo is at https://github.com/duetosymmetry/web-site/tree/customization https://github.com/duetosymmetry/web-site/tree/customization . The JS for controlling the web toy is at https://github.com/duetosymmetry/web-site/blob/customization/assets/js/poly-root-toy.js https://github.com/duetosymmetry/web-site/blob/customization... . This relies on a modified version of Polynomial.js which I will hopefully get accepted upstream, but for now it's just on my fork at https://github.com/duetosymmetry/Polynomial.js/tree/Aberth https://github.com/duetosymmetry/Polynomial.js/tree/Aberth (though this is also behind my local repo).