sgsellan / gpytoolbox

A collection of utility functions to prototype geometry processing research in python
https://gpytoolbox.org
GNU General Public License v3.0
196 stars 16 forks source link

Rotation matrix aligning two vectors #107

Closed sgsellan closed 10 months ago

odedstein commented 10 months ago

Depending on how much time you have right now, here are two ways to make this futureproof:

Can we make it work for 2D vectors?

Can we make it vectorized? If I give it (n,3), (n,3) input, I want to get (n,3,3) matrices where it works for each rowwise pair.

sgsellan commented 10 months ago

Okay, I made this work for 2D, but I'd merge it as is. I can't really think of a case in which I want a vectorized version of this and I'm afraid it'll be ambiguous with sizes (e.g., if I give it a (3,) and (3,n) input, what happens? Will the output always be a 3-array, with one dimension trivial if the input are only vectors?) So I would merge it as is.

odedstein commented 10 months ago

Ok, let's postpone the parallel behavior as a nice todo for the future.