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
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
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.
  1. You draw a square on xy plane centered at origin, note that currently the normal is given by z axis
  2. You move this square to the desired center.
  3. You use Eular matrix to rotate the square so that the normal matches the given normal direction.

Jakob Sørensen
Jakob Sørensen 2012-3-4
I might have been a bit sloppy with the details. So let me try to clarify:
  • I need to show a 2D plane of a 3D volume, which should be able to be any plane whatsoever.
  • The plane is gonna be defined by a "unit plane" having side lengths 1, centered in (0,0) and no rotation. That unit plane, will then be translated, scaled and rotated.
  • What I need to make here, is a "minimap" showing the direction of the plane you are looking at. Hence i just want to make a small square plane, that is translated and rotated as the view plane (scaling won't have to be showed in the minimap).
  • Therefore, it's quite important that the plane is defined by the normal vector and center point.
  • I know this gives infinite possibilities when it comes to rotation around the center axis (normal vector), but here i want to keep it so that the upper and lower edge of the square, is parallel to the horizontal axis of the 3D volume.
That was quite a lot of text, hope I didn't bore anyone to death. I really appreciate all you help. Thanks.
- Jake
  2 个评论
Honglei Chen
Honglei Chen 2012-3-4
Then isn't this the same as I suggested above? You make a plane and move/rotate it.
Jakob Sørensen
Jakob Sørensen 2012-3-4
It's definitely something like that, although mathematically I think it's an advantage to rotate first.
But where I start to get really confused is when it comes to the code of how to plot it. So do you have any suggestions on which functions and stuff I should look into?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by