0
|
4538 Views
|
|
0 Total Likes
View groups...
Share
GROUPS:

# How to solve...

Posted 11 years ago
 Hey,I'm sitting on a Mathamatica program where I have to screen a vector on a plane.So now my problem is, that I have to put a Manipulate command in it where I can change the coordinates of the vector and the plane.I think the solution must be really easy, but I can't figure it out,That's my solution so far: u0 = 0; u1 = 4; u2 = 7; u3 = 3; u = {u0, u1, u2, u3};  n = {u1, u2, u3};  anf = -10; end = -anf;  gf1 = ContourPlot3D[{1, x, y, z}.u == 0, {x, anf, end}, {y, anf, end}, {z, anf, end}, Boxed -> False, AxesOrigin -> {0, 0, 0},AxesLabel -> {"x", "y", "z"}, ContourStyle -> {Blue, Opacity[0.4]}];q = 2;s = {2, 2, 2} ; r = {5, 7, 9} ;v = s + q*(r - s) // MatrixForm; (*3D-Vekotr*)c = Graphics3D[{Red, Arrow[{s, r}]}];(* Projektionsstrahl *)f1 = r - k*n;gf3 = ParametricPlot3D[f1, {k, 0, 2}, PlotStyle -> {Green, Thick}];f2 = s - j*n;gf4 = ParametricPlot3D[f2, {j, 0, 2}, PlotStyle -> {Green, Thick}];x1 = r[] - k*u1;y1 = r[] - k*u2;z1 = r[] - k*u3;sol1 = Solve[u1 x1 + u2 y1 + u3 z1 == u0, k];k1 = k /. sol1[];dp1 = r - k1*n;x2 = s[] - j*u1;y2 = s[] - j*u2;z2 = s[] - j*u3;sol2 = Solve[u1 x2 + u2 y2 + u3 z2 == u0, j];j1 = j /. sol2[];dp2 = s - j1*n;p = dp2 - dp1gf5 = Graphics3D[{Red, Thick, Arrow[{dp2, dp1}]}];l = EuclideanDistance[dp2, dp1] // N;Show[{gf1, c, gf3, gf4, gf5}, Axes -> True, Boxed -> False,AxesLabel -> {"x", "y", "z"}, AxesOrigin -> {0, 0, 0}]I want to have u={u0, u1, u2, u3} and the vector v = s + q*(r - s) in the Manipulate command.Please help me!Thanks and CheersLinda