Relative Lage von Geraden
> restart; with(geom3d):
Definition zweier Punkte P und Q:
> point(P, [-2, 3, -1]): point(Q, [1, -2, 2]):
Definition der Geraden g durch P und Q:
> line(g, [P, Q]);
g
Definition der Geraden h durch den Punkt A(-1|3|-1) und den Richtungsvektor (-3, -5, 2):
> line(h, [point(A, [-1, 3, -1]), [-3, -5, 2]]);
h
Schneiden sich g und h?
> intersection(S, g, h);
intersection: "the given objects do not intersect"
> draw([g,h],
axes = boxed,
view = [-5..5, -5..5, -5..5],
color = [blue, red],
labels = [x1, x2, x3],
font = [COURIER, 10],
labelfont = [Courier, 12],
orientation = [89, 61, -18]);
view = [-5..5, -5..5, -5..5],
color = [blue, red],
labels = [x1, x2, x3],
font = [COURIER, 10],
labelfont = [Courier, 12],
orientation = [89, 61, -18]);
Abstand zwischen g und h:
> d:= evalf(distance(g, h), 4);
Die oben definierten Geraden g und h sind windschief:
> AreSkewLines(g, h);
true
Definition einer neuen Gerade h:
> interface(showassumed = 0):
assume(a, positive):
line(h, [point(A, [-1, 3, -1]), point(B, [-3, a, 2])]);
Equation(h, [t]);
x:= <op(%)>;
line(h, [point(A, [-1, 3, -1]), point(B, [-3, a, 2])]);
Equation(h, [t]);
x:= <op(%)>;
Abstand zwischen g und h:
> d:= simplify(distance(g, h));