algorithmic modeling for Rhino
hi!
when creating a very simple member index with points there seems to be some locations for the point that work perfectly and some others not
here you can see the same points in a position that work and same ones in a position that doesn't work.
and as you can see in the panel we are talking about the exact same point...
Tags:
Hi David,
You're right, they're not the same number, but what is strange is that they should be.
Those numbers are the coordinates of points,which should be the same point.
There's 2 curves, the region intersection is intersecting:
curve A with itself and with curve B (two resulting area centers),
and it's also intersecting
curve B with itself and with curve A (other two resulting area centers).
how can A-B be different than B-A?
maybe I'm missing something in my logical way of putting it... it's driving me crazy haha
Floating point arithmetic is not exact. Every time you perform some calculation you will get some errors in the least significant digits, and these errors aren't necessarily symmetric. The more calculations you perform, the worse the errors get. Especially subtraction is prone to a particularly severe type of error called catastrophic cancellation.
You don't have to understand the details of this, you just need to remember that when comparing floating point numbers, you almost never want to rely on exact equality. You must always pick the right tolerances for the problem at hand and treat values as equal if they fall within the same tolerance.
I feel like this "problem" comes up enough that it almost warrants a voronoi-style user warning message on first use.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by