LoginSignup
0
0

More than 1 year has passed since last update.

Maximaで線分上の最も近い点

Last updated at Posted at 2016-12-23

(参考)

LP:matrix([0,0,1]);
LQ:matrix([1,1,1]);
SP:matrix([0,0,1]);
SQ:matrix([sqrt((LP[1,1]-LQ[1,1])^2+(LP[1,2]-LQ[1,2])^2),0,1]);
A:matrix(
 [LP[1,1],-LP[1,2],1,0],
 [LP[1,2],LP[1,1],0,1],
 [LQ[1,1],-LQ[1,2],1,0],
 [LQ[1,2],LQ[1,1],0,1]
);
K:invert(A).transpose(matrix([SP[1,1],SP[1,2],SQ[1,1],SQ[1,2]]));
T:matrix(
 [K[1,1],-K[2,1],K[3,1]],
 [K[2,1],K[1,1],K[4,1]],
 [0,0,1]
);
IN:matrix([1,0,1]);
SP1:T.transpose(IN);
OT:transpose(invert(T).transpose(matrix([SP1[1,1],0,1])));
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0