Convert orient to normal!

   2991   3   2
User Avatar
Member
141 posts
Joined: Dec. 2015
Offline
Hi,

I couldn't find the answer for my question. I've got a nice pointcloud, but I have only orientation. I need the normal of the points. How can I convert the @orient attribute to @N?

Thanks in advance,
User Avatar
Member
11 posts
Joined: Nov. 2016
Offline
AttribWrangle with
v@N = qrotate(@orient,set(0,0,1));
should do the trick.
User Avatar
Member
141 posts
Joined: Dec. 2015
Offline
Perfect, thanks!
User Avatar
Member
24 posts
Joined: April 2020
Offline
v@N = qrotate(@orient,set(0,0,1));
v@up = qrotate(@orient,set(0,1,0));


-----------convert back-------------


p@orient = quaternion(maketransform(@N, @up));
Edited by Nuuk - Oct. 9, 2022 09:15:50
  • Quick Links