296
2011-06-14 23:27:45 +0000
Add a solve method to ParametrizedLine and Hyperplane
2019-12-04 10:52:04 +0000
1
1
1
Unclassified
Eigen
Geometry
unspecified
All
All
NEW
---
enhancement
---
1
andy.somerville
eigen.nobody
gael.guennebaud
hauke.heibel
jacob.benoit.1
oldest_to_newest
1198
0
andy.somerville
2011-06-14 23:27:45 +0000
It would be nice to be able to pass in a vector of dimensionality one less than that of the line or hyper plane and to have it solve for the final parameter.
1214
1
andy.somerville
2011-06-15 07:38:04 +0000
I'm not sure what the best approach for an API for this feature would be but I have a few ideas:
ParametrizedLine<float,3> line( Vector3f(), Vector3f(1,1,1) );
Vector3f solution;
Vector3f parameters( 2, 0, 0 );
Vector3f mask( 1, 0, 0 );
solution = line.solve( parameters, mask );
or
int paramIndex = 0;
solution = line.solve( parameters, paramIndex );
or
float parameter = 2;
int paramIndex = 0;
solution = line.solve( parameter, paramIndex );
For HyperPlane:
HyperPlane<float,3> plane( Vector3f(1,1,1).normalized(), Vector3f() );
ParametrizedLine<float,3> lineSolution;
Vector3f pointSolution;
float parameter = 0;
int paramIndex = 0;
lineSolution = plane.solve( parameter, paramIndex );
float param1 = 0;
int param1Index = 0;
float param2 = 0;
int param2Index = 1;
pointSolution = plane.solve( param1, param1Index, param2, param2Index );
or
int param1Index = 0;
int param2Index = 1;
Vector3f parameters( 2, 3, 0 );
pointSolution = plane.solve( parameters, param1Index, param2Index );
Thoughts?
1216
2
gael.guennebaud
2011-06-15 09:43:39 +0000
Hi,
sorry but I don't really understand what you want here. It seems to me that what you want is simply the intersection of a line and plane where one of the object is aligned on the axes, right? Then we already have that trough the intersection() method. E.g.:
ParametrizedLine3f line( Vector3f(), Vector3f(1,1,1) );
Vector3f solution;
Vector3f parameters( 2, 0, 0 );
Vector3f mask( 1, 0, 0 );
solution = line.intersection(Hyperplane3f(parameters,mask));
1230
3
andy.somerville
2011-06-15 19:55:37 +0000
> sorry but I don't really understand what you want here. It seems to me that
> what you want is simply the intersection of a line and plane
Which just goes to show that I shouldn't enter bugs/feature requests late at night.
Anyway, I think only covers on of 3 cases. If I'm thinking correctly there are still 2 cases not covered:
Intersection of two lines, and the intersection of two hyperplanes.
8740
4
eigen.nobody
2019-12-04 10:52:04 +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/296.