0
$\begingroup$

I'm trying to plot a normal vector to a plane. I know I'm doing something I should know better, but can't seem to find. Vectors {0, 1, 2}, {1, 1, 3} obviously determine a plane. Their Cross Product is {1, 2, -1}, which is normal. Unfortunately this code (all from the origin):

Graphics3D[{{Blue, Arrow[{{0, 0, 0}, {0, 1, 2}}]}, {Red, Arrow[{{0, 0, 0}, {-1, -2, 1}}]}, 
{Blue, Arrow[{{0, 0, 0}, {1, 1, 3}}]}}]

Yields,

enter image description here

Which doesn't look quite right. Just don't trust pictures? Any thoughts appreciated. Trying a different way I found some Mathematica code from a multivariable course for normals to a plane... and I got the same thing...

$\endgroup$
2
  • $\begingroup$ Check BoxRatios. $\endgroup$ Commented May 3, 2021 at 18:11
  • $\begingroup$ This is great, thank you! $\endgroup$ Commented May 3, 2021 at 20:13

2 Answers 2

2
$\begingroup$
v1 = {0, 1, 2};
v2 = {-1, -2, 1};
v3 = Cross[v1, v2];
origin = {0, 0, 0};

Graphics3D[
 {Opacity[0.5], InfinitePlane[origin, {v1, v2}], Opacity[1],
  Blue, Arrow[{origin, v1}], Arrow[{origin, v2}],
  Red, Arrow[{origin, v3}]},
 PlotRange -> {{-5, 5}, {-5, 5}, {-5, 5}}, ViewPoint -> {1, -3, 1}]

enter image description here

$\endgroup$
1
$\begingroup$

Using option AspectRatio we can adjust the picture

Graphics3D[{{Blue, Arrow[{{0, 0, 0}, {0, 1, 2}}]}, {Red, 
    Arrow[{{0, 0, 0}, {-1, -2, 1}}]}, {Blue, 
    Arrow[{{0, 0, 0}, {1, 1, 3}}]}}, AspectRatio -> 1, Axes -> True, 
  AxesLabel -> {"x", "y", "z"}, AxesStyle -> RGBColor[0, 0, 0], 
  BaseStyle -> 12]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.