From normal vector (and point) to 3D plane
9 次查看(过去 30 天)
显示 更早的评论
Hey,
I am looking to plot a plane in 3D from its center point and normal vector. And on top of that it should preferably have the side length 1 (on all 4 sides).
Is that possible? And if it is, then how?
Thanks in advance...
- Jake
1 个评论
Jan
2012-3-2
The question is still not unique: "Side length 1 on all 4 sides" implies, that it should be a square. But it can be rotated around the normal freely.
What exactly does "plot" mean? You can e.g. display this object very easily by drawing a square and assuming, that the eye is set to a point on the normal vector above the center and rotated accordingly.
回答(2 个)
Honglei Chen
2012-3-2
Like Jan mentioned, the question you are asking does not have a unique solution, so you may want to clarify it a little bit.
This being said, if you don't care about the rotation, you can use the following procedure. It is in some sense cheating because you are not deriving the shape from the normal vector, but hey it serves the plotting purpose.
- You draw a square on xy plane centered at origin, note that currently the normal is given by z axis
- You move this square to the desired center.
- You use Eular matrix to rotate the square so that the normal matches the given normal direction.
0 个评论
Jakob Sørensen
2012-3-4
2 个评论
Honglei Chen
2012-3-4
Then isn't this the same as I suggested above? You make a plane and move/rotate it.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!