stevenpetryk / mafs

React components for interactive math
https://mafs.dev
MIT License
3.24k stars 90 forks source link

Improve plot drawing (adaptive sampling) #75

Closed stevenpetryk closed 1 year ago

stevenpetryk commented 1 year ago

This reworks how function plots are generated. In terms of API changes, this is the situation:

Internally, the smartSmooth function has been revised to do less work. The passed-in function is evaluated less frequently, error is calculated based on square distance rather than triangle area (again, less work), and array allocations are reduced.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
mafs ✅ Ready (Inspect) Visit Preview Jan 8, 2023 at 9:41PM (UTC)