Need to handle irregular geometric inputs
I’ve been working on a project using STM32 where I need to handle irregular geometric inputs (user-defined coordinates) and compute results efficiently on the device side.
While implementing this, I started exploring different approaches for calculating areas of irregular shapes, especially when dealing with limited resources and precision constraints typical in embedded systems. The Shoelace formula seems like a good fit, but I’m curious how others here handle optimization for such calculations on STM32 (e.g., fixed-point vs floating-point, performance trade-offs, etc.).
I also experimented with similar logic in a browser-based tool, like this irregular shapes calculator, mainly to validate the math and input handling before porting it to embedded code.
My main questions:
What’s the most efficient way to implement polygon area calculations on STM32?
Do you recommend sticking with float/double, or using fixed-point arithmetic for better performance?
Any best practices for handling dynamic input sets (variable number of vertices)?
Would really appreciate insights or examples from anyone who’s worked on similar embedded geometry or computational tasks.
Thanks!
