301
2011-06-22 23:58:07 +0000
ParametrizedLine origin assumptions affect isApprox
2019-12-04 10:54:23 +0000
1
1
1
Unclassified
Eigen
Geometry
3.0
All
All
NEW
---
Unknown
---
1
andy.somerville
eigen.nobody
gael.guennebaud
hauke.heibel
jacob.benoit.1
oldest_to_newest
1241
0
andy.somerville
2011-06-22 23:58:07 +0000
ParametrizedLine operates under the assumption that origins passed in are standardized. If developers create two lines that are mathematically identical, but are created with different origins, functions such as isApprox will fail unexpectedly.
There's a chance I'm misunderstanding something, but it seems that this is a bug.
There are two solutions I can think of:
* As in the warning about the direction being normalized, we could warn that the origin is assumed to be a particular dim - 1 intercept,
* We could calculate some standardized origin internally though this might cause lowered performance for those creating large numbers of ParametrizedLines.
1242
1
gael.guennebaud
2011-06-23 09:53:43 +0000
Note that this is a *parametrized* line, so the origin is very important and unique. That said, we could clarify that in the class documentation and in the doc of isApprox. We could even imagine adding another "is approx" like function neglecting the parametrization, and/or add a function to transform it to a canonical form...
1245
2
andy.somerville
2011-06-24 00:41:45 +0000
> Note that this is a *parametrized* line, so the origin is very important and
unique.
I wasn't aware of the distinction. (It's been a while since linear algebra)
Does this perhaps argue for a separate class that is just "Line" or "CannonicalLine" which is not parametrized?
1272
3
andy.somerville
2011-07-04 20:03:03 +0000
It took me a while to arrive at the idea that for even slightly non parallel lines, the concept of approximately "same" is nonsensical in the sense that any two non parallel lines will intersect *somewhere* and in that neighborhood they will seem approximately the same. Sorry, part of making an awesome, easy to use matrix lib is putting up us less mathematically focused people : )
Users can of course do their own direction comparison, but IMO it might be nice to encapsulate this in a "isApproxParallel" which would simply compare the directions + negative directions with some epsilon, which would be cleaner than people doing it by hand all over the place. Combined with the distance function that's already there, I think this would be a helpful addition for people doing lots of line comparison.
I'll write up a patch tomorrow in case the Eigen team agrees.
8745
4
eigen.nobody
2019-12-04 10:54:23 +0000
-- GitLab Migration Automatic Message --
This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/301.