开发者

Projection on a plane using a 2*3 matrix

开发者 https://www.devze.com 2023-01-01 02:05 出处:网络
I can easily draw the projection of a 3D set of points onto the plane with normal vector (1,1,1), by using the matrix

I can easily draw the projection of a 3D set of points onto the plane with normal vector (1,1,1), by using the matrix

    (-sqrt(3)/2   sqrt(3)/2   0)
    (-1/2         -1/2        1).

I want to do the same thing, but for a projection onto an arbitrary plane with normal vector (a,b,c) instead of (1,1,1). How to find the matrix?

Thanks in advance!

EDIT: rephrasing of the question:

When viewing from (1,1,1), the three unit vectors are projected to (-sqrt(3)/开发者_StackOverflow2, -1/3), (sqrt(3)/2, -1/2), (0,1). (Up to a scaling factor which doesn't matter.)

I want to find the projection of the three unit vectors when viewed from (a,b,c) instead of (1,1,1).


Back when I wrote such a code, I simply used wikipedia's nice article on this topic.

There are additional ressources available here and here. There is also a related question on SO.


I'm afraid you're can't stuck with 3x2 matrix in arbitrary plane case. Here is a great paper for exactly what you're looking for.

0

精彩评论

暂无评论...
验证码 换一张
取 消