Notifications
Clear all

[Closed] Has "matrixFromNormal <point3>" limitation?

vector aa=[0.0109384,0.706935,-0.707194]
vector bb=[0.0111161,0.70914,-0.70498]

aa and bb are very close to each other,but use matrixFromNormal to them

MatrixFromNormal aa
(matrix3 [-0.99988,0,-0.0154655] [-0.0109331,0.707279,0.70685] [0.0109384,0.706935,-0.707194] [0,0,0])

MatrixFromNormal bb
(matrix3 [0,0.705024,0.709184] [0.999938,-0.00788336,0.00783711] [0.0111161,0.70914,-0.70498] [0,0,0])

obviously,the two matrix3 are big different coordinate systems,
why this happen? IS this a bug to “matrixFromNormal <point3>” or anything else?

Thanks for help.

4 Replies
 PEN

Looks right to me.

aa=[0.0109384,0.706935,-0.707194]
bb=[0.0111161,0.70914,-0.70498]

point pos:aa wireColor:red size:.5 axisTripod:false
point pos:bb wireColor:blue size:.5 axisTripod:false

pt=point axisTripod:true wireColor:red size:1
pt.transform=MatrixFromNormal aa

pt=point axisTripod:true wireColor:blue size:1
pt.transform=MatrixFromNormal bb

Thanks PEN for reply.

I mean “the two matrix3 are big different coordinate systems” is only z axis direction of two matrix3 have very little different,but x axis has 90 degree difference,y axis also has 90 degree difference.

you can see “point3” and “point4” of your script show this.

if MatrixFromNormal use a same coordinate code,90 degree seems too big .

1 Reply
 PEN
(@pen)
Joined: 11 months ago

Posts: 0

I see what you are saying. Ya I don’t know why that is. I would suggest that you just build the matrix your self using the cross product of the vector and an up vector.

Yes!I will try “cross product” to custom my own “matrixFromNormal” tomorrow, but why this happen ,it has confused me almost two weeks.

Thanks,Paul Neale,have a good day.