Programm-File
===>Testversion 2.1 <===

Autor: Rolf Wirz

Programme

Testversionen von Programmen.

Dieses File enthält Funktionen und Module (von Rolf Wirz, Testversionen mit einfachen Mathematica-Mitteln - einfachheit auf Kosten des Umfanges!). Die Ausführung geschieht im File "GeoSchnittAbstandWorkFile.nb", wo sich die Programmaufrufe befinden!
Erst Run machen mit diesem File (Source-Code), dann Programme ausführen in "GeoSchnittAbstandWorkFile.nb"

\(\(\( (*\ 
      Putzmaschine\ *) \)\(
\)\(\ \)\(Remove["Global`*"];\)\)\)

Off[ ];
Off[General::spell];
Off[General::spell1];

Für eine eventuelle Fehlerlokalisation (Debugging-Tool für Fortgeschrittene Benutzer)

var1Stop2Never3Use = 
        1;

(* 
      Vektorlänge *) 

vLen[v_] := Sqrt[v . v];

(* 
      Modul 1 *) 

schnitt[
          ps1_, ps2_, ps3_, qs1_, qs2_] := 
        Module[{ebene, gerade, λ, μ, t, solv, solv1, sys}, 
          Off[General::spell]; 
ebene[λ_, μ_] := 
            ps1 + λ (ps2 - ps1) + μ (ps3 - 
                    ps1);  (* *)  
          If[var1Stop2Never3Use == 9,  
            Print[ebene[λ99, μ99]], 
            leer = leer]; 
gerade[t_] := 
            qs1 + t (qs2 - qs1); 
 (* *)  
          If[var1Stop2Never3Use == 9,  Print[gerade[t99]], 
            leer = leer]; 
          sys[t_, λ_, μ_] := (Table[ebene[λ, μ][[k]] == gerade[t][[k]], {k, 1, 
                  Length[ps1]}]); 
 (* *)   If[
            var1Stop2Never3Use == 9,  
            Print[sys[t99, λ99, μ99]], 
            leer = leer]; 
solv = 
            Solve[sys[t, λ, μ], {t, λ, μ}] // 
              Flatten; 
 (* *)   If[
            var1Stop2Never3Use == 9,  Print[solv], 
            leer = leer]; 
solv1 = solv[[1]][[2]]; 
 (* *)   If[
            var1Stop2Never3Use == 9,  Print[solv1], 
            leer = leer]; 
res = 
            gerade[solv1]
];

\(\(\( (*\ 
      Modul\ 2\ a\ *) \)\(
\)\(
\)\(\(uPunkt[pUm_, pU1_, 
          pU2_, qU1_, qU2_, abweichungIn_] := 
        Module[
{ebene1, ebene2, kugel1, kugel2, x, y, z, 
            solv1, 
solv2, solv1Wert, solv2Wert, hPunkt1, 
            pUm1, pUm2, abInt, \ abweichung}, 
Off[
            General::spell]; 
Off[\ ]; 
abweichung = 
            abweichungIn/100; 
hPunkt1[t_] := 
            pUm + t\ \((pU1 - pUm)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, Print[hPunkt1[tZ1]], 
            leer = leer]; 
solvhPunkt1 = 
            Flatten[Solve[\((qU1 - hPunkt1[ta])\) . \ \((pU1 - 
                        pUm)\) == 
                  0, {ta}]]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[solvhPunkt1], 
            leer = leer]; 
t1 = 
            ta /. solvhPunkt1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[t1], 
            leer = leer]; 
pUm1 = 
            hPunkt1[t1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[pUm1], 
            leer = leer]; 
hPunkt2[t_] := 
            pUm + t\ \((pU2 - pUm)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[hPunkt2[tZ2]], 
            leer = leer]; 
solvhPunkt2 = 
            Flatten[Solve[\((qU2 - hPunkt2[tb])\) . \ \((pU2 - 
                        pUm)\) == 
                  0, {tb}]]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[solvhPunkt2], 
            leer = leer]; 
t2 = 
            tb /. solvhPunkt2; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[t2], 
            leer = leer]; 
pUm2 = 
            hPunkt2[t2]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[pUm2], 
            leer = leer]; 
ebene1[x_, y_, 
              z_] := \((pU1 - pUm)\) . \(({x, y, z} - 
                  pUm1)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[ebene1[x11, y22, z33]], 
            leer = leer]; 
ebene2[x_, y_, 
              z_] := \((pU2 - pUm)\) . \(({x, y, z} - 
                  pUm2)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[ebene2[x11, y22, z33]], 
            leer = leer]; 
kugel1[x_, y_, 
              z_] := \(({x, y, z} - pUm1)\) . \(({x, y, z} - 
                    pUm1)\) - \((qU1 - pUm1)\) . \((qU1 - 
                    pUm1)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[kugel1[x11, y22, z33]], 
            leer = leer]; 
kugel2[x_, y_, 
              z_] := \(({x, y, z} - pUm2)\) . \(({x, y, z} - 
                    pUm2)\) - \((qU2 - pUm2)\) . \((qU2 - 
                    pUm2)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[kugel2[x11, y22, z33]], 
            leer = leer]; 
Print["Umklappradius1=Umklappradius2 ist ", \ 
            vLen[qU1 - pUm1] == vLen[qU2 - pUm2]]; \ 
          Print["  |qU1 - qUm1| = ", 
            vLen[qU1 - pUm1], \ " und ", "  |qU2 - qUm2| = ", 
            vLen[qU2 - 
                pUm2]]; 
abInt = \((vLen[qU1 - pUm1] - 
                  vLen[qU2 - pUm2])\)/
              Max[{vLen[qU1 - pUm1], 
                  vLen[qU2 - pUm2]}]; 
If[
            abInt < abweichung, 
            Print["Abweichung der Radien ", \ 
              abInt // N, \ " kleiner als Maximum ", 
              abweichung // N\ ]\ ; 

If[
              vLen[qU1 - pUm1] == vLen[qU2 - pUm2], \ 
              Print["Radien stimmen exakt überein  "]\ \ , \ 
Print["Radien stimmen nicht exakt überein"]]; 
solv1[x_, y_, z_] := 
              Solve[{ebene1[x, y, z] == 0, ebene2[x, y, z] == 0, 
                  kugel1[x, y, z] == 0}, {x, y, 
                  z}]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ Print[solv1[xZ1, yZ2, zZ3]], 
              leer = leer]; 
solv11Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv1[x, y, 
                    z]\)[\([1]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv11Wert[xOut, yOut, zOut]], 
              leer = leer]; 
solv12Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv1[x, y, 
                    z]\)[\([2]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv12Wert[xOut, yOut, zOut]], 
              leer = leer]; 
Print["1. Position Schnittpunkt mit Radius1 = ", 
solv11Wert[x, y, z] // 
                N]; 
Print["2. Position Schnittpunkt mit Radius1 = ", 
              solv12Wert[x, y, z] // N]; 
solv2[x_, y_, 
                z_] := Solve[{ebene1[x, y, z] == 0, 
                  ebene2[x, y, z] == 0, 
                  kugel2[x, y, z] == 0}, {x, y, 
                  z}]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
Print[
                solv2[xZ1, yZ2, zZ3]], leer = leer]; 
            solv21Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv2[x, y, 
                    z]\)[\([1]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv21Wert[xOut, yOut, zOut]], 
              leer = leer]; 
solv22Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv2[x, y, 
                    z]\)[\([2]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv22Wert[xOut, yOut, zOut]], 
              leer = leer]; 
Print["1. Position Schnittpunkt mit Radius2 = ", 
              solv21Wert[x, y, z] // 
                N]; 
Print["2. Position Schnittpunkt mit Radius2 = ", 
              solv22Wert[x, y, z] // 
                N];

, \ 
            Print["Stop"]; \ \ Print["Abweichung der Radien grösser als erlaubtes Maximum: ", \ 
              abInt // N, \ " statt ", \ 
              abweichung // 
                N\ ]];
];\)

 (*\ 
      Modul\ 2\ b\ *) 


    \(uPunktOldKurz[pUm_, pU1_, pU2_, qU1_, qU2_] := 
        Module[
{ebene1, ebene2, kugel1, kugel2, x, y, z, 
            solv1, 
solv2, solv1Wert, solv2Wert, hPunkt1, 
            pUm1, pUm2}, 
Off[
            General::spell]; 
Off[\ ]; 
hPunkt1[t_] := 
            pUm + t\ \((pU1 - pUm)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, Print[hPunkt1[tZ1]], 
            leer = leer]; 
solvhPunkt1 = 
            Flatten[Solve[\((qU1 - hPunkt1[ta])\) . \ \((pU1 - 
                        pUm)\) == 
                  0, {ta}]]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[solvhPunkt1], 
            leer = leer]; 
t1 = 
            ta /. solvhPunkt1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[t1], 
            leer = leer]; 
pUm1 = 
            hPunkt1[t1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[pUm1], 
            leer = leer]; 
hPunkt2[t_] := 
            pUm + t\ \((pU2 - pUm)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[hPunkt2[tZ2]], 
            leer = leer]; 
solvhPunkt2 = 
            Flatten[Solve[\((qU2 - hPunkt2[tb])\) . \ \((pU2 - 
                        pUm)\) == 
                  0, {tb}]]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[solvhPunkt2], 
            leer = leer]; 
t2 = 
            tb /. solvhPunkt2; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[t2], 
            leer = leer]; 
pUm2 = 
            hPunkt2[t2]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[pUm2], 
            leer = leer]; 
ebene1[x_, y_, 
              z_] := \((pU1 - pUm)\) . \(({x, y, z} - 
                  pUm1)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[ebene1[x11, y22, z33]], 
            leer = leer]; 
ebene2[x_, y_, 
              z_] := \((pU2 - pUm)\) . \(({x, y, z} - 
                  pUm2)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[ebene2[x11, y22, z33]], 
            leer = leer]; 
kugel1[x_, y_, 
              z_] := \(({x, y, z} - pUm1)\) . \(({x, y, z} - 
                    pUm1)\) - \((qU1 - pUm1)\) . \((qU1 - 
                    pUm1)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[kugel1[x11, y22, z33]], 
            leer = leer]; 
kugel2[x_, y_, 
              z_] := \(({x, y, z} - pUm2)\) . \(({x, y, z} - 
                    pUm2)\) - \((qU2 - pUm2)\) . \((qU2 - 
                    pUm2)\); 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ Print[kugel2[x11, y22, z33]], 
            leer = leer]; 
Print["Umklappradius1=Umklappradius2 ist ", \ 
            vLen[qU1 - pUm1] == vLen[qU2 - pUm2], \ "  |qU1 - qUm1| = ", 
            vLen[qU1 - pUm1], \ " und ", "  |qU2 - qUm2| = ", 
            vLen[qU2 - pUm2]]; 
If[
            vLen[qU1 - pUm1] == 
              vLen[qU2 - pUm2], 
solv1[x_, y_, z_] := 
              Solve[{ebene1[x, y, z] == 0, ebene2[x, y, z] == 0, 
                  kugel1[x, y, z] == 0}, {x, y, 
                  z}]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ Print[solv1[xZ1, yZ2, zZ3]], 
              leer = leer]; 
solv11Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv1[x, y, 
                    z]\)[\([1]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv11Wert[xOut, yOut, zOut]], 
              leer = leer]; 
solv12Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv1[x, y, 
                    z]\)[\([2]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv12Wert[xOut, yOut, zOut]], 
              leer = leer]; 
Print["1. Position Schnittpunkt mit Radius1 = ", 
solv11Wert[x, y, z] // 
                N]; 
Print["2. Position Schnittpunkt mit Radius1 = ", 
              solv12Wert[x, y, z] // N]; 
solv2[x_, y_, 
                z_] := Solve[{ebene1[x, y, z] == 0, 
                  ebene2[x, y, z] == 0, 
                  kugel2[x, y, z] == 0}, {x, y, 
                  z}]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
Print[
                solv2[xZ1, yZ2, zZ3]], leer = leer]; 
            solv21Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv2[x, y, 
                    z]\)[\([1]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv21Wert[xOut, yOut, zOut]], 
              leer = leer]; 
solv22Wert[x_, y_, 
                z_] := {x, y, 
                  z} /. \(solv2[x, y, 
                    z]\)[\([2]\)]; 
 (*\ *) \ 
            If[var1Stop2Never3Use == 9, \ 
              Print[solv22Wert[xOut, yOut, zOut]], 
              leer = leer]; 
Print["1. Position Schnittpunkt mit Radius2 = ", 
              solv21Wert[x, y, z] // 
                N]; 
Print["2. Position Schnittpunkt mit Radius2 = ", 
              solv22Wert[x, y, z] // 
                N];\ , \ 
Print["Stop"]]
];\)\)\)\)

volumen[pV1_, pV2_, 
          pV3_, pV4_] := 
        Module[
{pI1, pI2, pI3, 
            pI4}, 
Off[General::spell]; 
          vol[pI1_, pI2_, pI3_, pI4_] := 
            Abs[Det[{pI2 - pI1, pI3 - pI1, pI4 - pI1}]/
                6]; 
Print["Näherung = ", 
            N[vol[pV1, pV2, pV3, pV4]]]; 
vol[pV1, pV2, 
            pV3, pV4]];

dreieck[
          qI1_, qI2_] := 
        Module[
{punktDreieck,  pI1,  
            pI2}, 
Off[General::spell]; 
          punktDreieck[pI1_, 
              pI2_] := ({{Cos[Pi/3], -Sin[Pi/3]}, {Sin[Pi/3], 
                      Cos[Pi/3]}} . (pI2 - pI1)) + 
              pI1; 
Show[
            Graphics[{PointSize[0.04], Point[punktDreieck[qI1, qI2]], 
                Line[{qI1, qI2, punktDreieck[qI1, qI2], qI1}]}], 
            AspectRatio -> 
              Automatic]; 
Print["3. Punkt zu Dreieck = \
",  punktDreieck[qI1, 
              qI2], ",",  " Näherung = ",   N[
              punktDreieck[qI1, qI2]]]];

\(\(\( (*\ 
      Modul\ 5\ a\ *) \)\(
\)\(
\)\(\(drehPunkt[qI1_, qI2_, 
          alpha_] := 
        Module[
{punkt}, 
Off[
            General::spell]; 
          punkt[pI1_, 
              pI2_, φ_] := \(({{Cos[φ\ Degree], \(-Sin[φ\ Degree]\)}, {Sin[φ\ Degree], 
                      Cos[φ\ Degree]}} . \((pI2 - pI1)\))\) + 
              pI1; 
Print["Gedrehter Punkt = ", \ 
            punkt[qI1, qI2, 
              alpha], ",", \ " Näherung = ", \ 
            N[punkt[qI1, qI2, 
                alpha]]]];\)

 (*\ 
      Modul\ 5\ b\ *) 


    \(drehPunktSkizze[qI1_, qI2_, alpha_] := 
        Module[
{punkt}, 
Off[
            General::spell]; 
          punkt[pI1_, 
              pI2_, φ_] := \(({{Cos[φ\ Degree], \(-Sin[φ\ Degree]\)}, {Sin[φ\ Degree], 
                      Cos[φ\ Degree]}} . \((pI2 - pI1)\))\) + 
              pI1; 
Show[
            Graphics[{PointSize[0.03], Point[punkt[qI1, qI2, alpha]], 
                Line[{punkt[qI1, qI2, alpha], qI1, qI2}]}], 
            AspectRatio -> 
              Automatic]; 
Print["Gedrehter Punkt = ", \ punkt[qI1, qI2, alpha]]];\)\)\)\)

\(\(\( (*\ 
      Modul\ 6.1\ *) \)\(
\)\(
\)\(raumDrehPunkt[pI1_, 
          pI2_, qI_, alpha_] := 
        Module[
{α, α1, p1, p2, p3, p4x1, 
            p4x2, p5x1, p5x2, p6x1, p6x2, p7x1, p7x2, q1, q2, q3, q4x1, q4x2, 
            q5x1, q5x2, q6x1, q6x2, q7x1, q7x2, φ1, , φ2, 
            dZ, dYInv, dZInv, vLen}, 
Off[
            General::spell]; 
printVar = 
            zusatzVarInModule6; 
vLen[v_] := 
            Sqrt[v . v]; 
α = 
            alpha; 
p1 = 
            pI2 - pI1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p1 = ", p1 // N], 
            leer = leer]; 
q1 = 
            qI - pI1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q1 = ", q1 // N], 
            leer = leer]; 
φ1 = 
            Arg[p1[\([1]\)] + 
                I\ p1[\([2]\)]]; 
If[\((\((p1[\([1]\)] == 0)\) || \((p1[\([2]\)] == 
                      0. )\))\)\  && \ \((\((p1[\([2]\)] == 
                      0)\)\  || \ \((p1[\([2]\)] == 
                      0. )\))\), \ φ1 = 0, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["φ1 = ", φ1/Degree // N], 
            leer = leer]; 
dZInv[
              p_, β_] := {{Cos[\(-β\)], \(-Sin[\(-β\)]\), 
                  0}, {Sin[\(-β\)], Cos[\(-β\)], 0}, {0, 0, 1}} . 
              p; 
p2 = 
            dZInv[p1, φ1]; 
q2 = 
            dZInv[q1, φ1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p2 = ", p2 // N], 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q2 = ", q2 // N], 
            leer = leer]; 
φ2 = 
            Arg[p2[\([3]\)] + 
                I\ p2[\([1]\)]]; 
If[\((\((p2[\([3]\)] == 0)\) || \((p2[\([3]\)] == 
                      0. )\))\)\  && \ \((\((p2[\([1]\)] == 
                      0)\)\  || \ \((p2[\([1]\)] == 
                      0. )\))\), \ φ2 = 0, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["φ2 = ", φ2/Degree // N], 
            leer = leer]; 
dYInv[
              p_, β_] := \(({{Cos[\(-β\)], 
                      0, \(-Sin[\(-β\)]\)}, {0, 1, 
                      0}, {Sin[\(-β\)], 0, 
                      Cos[\(-β\)]}} . \((p[\([{3, 2, 
                          1}]\)])\))\)[\([{3, 2, 
                  1}]\)]; 
p3 = 
            dYInv[p2, φ2] // N; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p3 = ", p3 // N], 
            leer = leer]; 
q3 = 
            dYInv[q2, φ2]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q3 = ", q3 // N], 
            leer = leer]; 
dZ[
              p_, γ_] := {{Cos[γ], \(-Sin[γ]\), 
                  0}, {Sin[γ], Cos[γ], 0}, {0, 0, 1}} . 
              p; 
α1 = α\ /
                360\ *2\ Pi; 
p4x1 = 
            dZ[p3, α1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p4x1 = ", p4x1 // N], 
            leer = leer]; 
q4x1 = 
            dZ[q3, α1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q4x1 = ", q4x1 // N], 
            leer = leer]; 
p4x2 = 
            dZ[p3, \(-α1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p4x2 = ", p4x2 // N], 
            leer = leer]; 
q4x2 = 
            dZ[q3, \(-α1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q4x2 = ", q4x2 // N], 
            leer = leer]; 
p5x1 = 
            dYInv[p4x1, \(-φ2\)] // N; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p5x1 = ", p5x1 // N], 
            leer = leer]; 
p5x2 = 
            dYInv[p4x2, \(-φ2\)] // N; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p5x2 = ", p5x2 // N], 
            leer = leer]; 
q5x1 = 
            dYInv[q4x1, \(-φ2\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q5x1 = ", q5x1 // N], 
            leer = leer]; 
q5x2 = 
            dYInv[q4x2, \(-φ2\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q5x2 = ", q5x2 // N], 
            leer = leer]; 
p6x1 = 
            dZInv[p5x1, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p6x1 = ", p6x1 // N], 
            leer = leer]; 
p6x2 = 
            dZInv[p5x2, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p6x2 = ", p6x2 // N], 
            leer = leer]; 
q6x1 = 
            dZInv[q5x1, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q6x1 = ", q6x1 // N], 
            leer = leer]; 
q6x2 = 
            dZInv[q5x2, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q6x2 = ", q6x2 // N], 
            leer = leer]; 
p7x1 = 
            p6x1\  + \ pI1; 
p7x2 = 
            p6x2\  + \ pI1; 
q7x1 = 
            q6x1\  + \ pI1; 
q7x2 = 
            q6x2\  + \ pI1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ 
            Print["Erster Punkt p7x1 = ", 
              p7x1 // N]; 
Print["Zweiter Punkt p7x2 = ", p7x2 // N];
, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ 
            Print["Erster Punkt q7x1 = ", 
              q7x1 // N]; 
Print["Zweiter Punkt q7x2 = ", q7x2 // N];
, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ 
            Print["Erster Punkt exakt = ", \ 
              q7x1]; 
Print["Zweiter Punkt exakt = ", \ \ q7x2];, \(leer = leer;\)]; 
Print["Erster Punkt = ", 
            q7x1 // N]; 
Print["Zweiter Punkt = ", 
            q7x2 // N]
];\)\)\)

\(\(\( (*\ 
      Modul\ 6.2\ *) \)\(
\)\(
\)\(raumDrehPunktPlot[pI1_, 
          pI2_, qI_, alpha_, prange_] := 
        Module[
{α, α1, p1, p2, p3, p4x1, 
            p4x2, p5x1, p5x2, p6x1, p6x2, p7x1, p7x2, q1, q2, q3, q4x1, q4x2, 
            q5x1, q5x2, q6x1, q6x2, q7x1, q7x2, φ1, , φ2, 
            dZ, dYInv, dZInv, vLen}, 
Off[
            General::spell]; 
vLen[v_] := 
            Sqrt[v . v]; 
α = 
            alpha; 
p1 = 
            pI2 - pI1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p1 = ", p1 // N], 
            leer = leer]; 
q1 = 
            qI - pI1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q1 = ", q1 // N], 
            leer = leer]; 
φ1 = 
            Arg[p1[\([1]\)] + 
                I\ p1[\([2]\)]]; 
If[\((\((p1[\([1]\)] == 0)\) || \((p1[\([2]\)] == 
                      0. )\))\)\  && \ \((\((p1[\([2]\)] == 
                      0)\)\  || \ \((p1[\([2]\)] == 
                      0. )\))\), \ φ1 = 0, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["φ1 = ", φ1/Degree // N], 
            leer = leer]; 
dZInv[
              p_, β_] := {{Cos[\(-β\)], \(-Sin[\(-β\)]\), 
                  0}, {Sin[\(-β\)], Cos[\(-β\)], 0}, {0, 0, 1}} . 
              p; 
p2 = 
            dZInv[p1, φ1]; 
q2 = 
            dZInv[q1, φ1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p2 = ", p2 // N], 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q2 = ", q2 // N], 
            leer = leer]; 
φ2 = 
            Arg[p2[\([3]\)] + 
                I\ p2[\([1]\)]]; 
If[\((\((p2[\([3]\)] == 0)\) || \((p2[\([3]\)] == 
                      0. )\))\)\  && \ \((\((p2[\([1]\)] == 
                      0)\)\  || \ \((p2[\([1]\)] == 
                      0. )\))\), \ φ2 = 0, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ 
            Print["φ2 = ", φ2/Degree // N], 
            leer = leer]; 
dYInv[
              p_, β_] := \(({{Cos[\(-β\)], 
                      0, \(-Sin[\(-β\)]\)}, {0, 1, 
                      0}, {Sin[\(-β\)], 0, 
                      Cos[\(-β\)]}} . \((p[\([{3, 2, 
                          1}]\)])\))\)[\([{3, 2, 
                  1}]\)]; 
p3 = 
            dYInv[p2, φ2]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p3 = ", p3 // N], 
            leer = leer]; 
q3 = 
            dYInv[q2, φ2]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q3 = ", q3 // N], 
            leer = leer]; 
dZ[
              p_, γ_] := {{Cos[γ], \(-Sin[γ]\), 
                  0}, {Sin[γ], Cos[γ], 0}, {0, 0, 1}} . 
              p; 
α1 = α\ /
                360\ *2\ Pi; 
p4x1 = 
            dZ[p3, α1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p4x1 = ", p4x1 // N], 
            leer = leer]; 
q4x1 = 
            dZ[q3, α1]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q4x1 = ", q4x1 // N], 
            leer = leer]; 
p4x2 = 
            dZ[p3, \(-α1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p4x2 = ", p4x2 // N], 
            leer = leer]; 
q4x2 = 
            dZ[q3, \(-α1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q4x2 = ", q4x2 // N], 
            leer = leer]; 
p5x1 = 
            dYInv[p4x1, \(-φ2\)] // N; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p5x1 = ", p5x1 // N], 
            leer = leer]; 
p5x2 = 
            dYInv[p4x2, \(-φ2\)] // N; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p5x2 = ", p5x2 // N], 
            leer = leer]; 
q5x1 = 
            dYInv[q4x1, \(-φ2\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q5x1 = ", q5x1 // N], 
            leer = leer]; 
q5x2 = 
            dYInv[q4x2, \(-φ2\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q5x2 = ", q5x2 // N], 
            leer = leer]; 
p6x1 = 
            dZInv[p5x1, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p6x1 = ", p6x1 // N], 
            leer = leer]; 
p6x2 = 
            dZInv[p5x2, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["p6x2 = ", p6x2 // N], 
            leer = leer]; 
q6x1 = 
            dZInv[q5x1, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q6x1 = ", q6x1 // N], 
            leer = leer]; 
q6x2 = 
            dZInv[q5x2, \(-φ1\)]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 
              9, \ 
Print["q6x2 = ", q6x2 // N], 
            leer = leer]; 
          p7x1 = p6x1\  + \ pI1; 
p7x2 = 
            p6x2\  + \ pI1; 
q7x1 = 
            q6x1\  + \ pI1; 
q7x2 = 
            q6x2\  + \ pI1; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ 
            Print["Erster Punkt p7x1 = ", 
              p7x1 // N]; 
Print["Zweiter Punkt p7x2 = ", p7x2 // N];
, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ 
            Print["Erster Punkt q7x1 = ", 
              q7x1 // 
                N]; 
Print["Zweiter Punkt q7x2 = ", 
              q7x2 // N];
, 
            leer = leer]; 
 (*\ *) \ 
          If[var1Stop2Never3Use == 9, \ 
            Print["Erster Punkt exakt = ", \ 
              q7x1]; 
Print["Zweiter Punkt exakt = ", \ 
              q7x2];, \(leer = 
                leer;\)]; 
Print["Erster Punkt = ", 
            q7x1 // N]; 
Print["Zweiter Punkt = ", 
            q7x2 // N]; 

\ 
          If[pNowVar == 
              9, \ 

sh[1] = 
              Show[Graphics3D[{{Text["Plot 1", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.02], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-5\), 0, 0}, {5, 0, 0}}], 
                    Line[{{0, \(-5\), 0}, {0, 5, 0}}], 
                    Line[{{0, 0, \(-5\)}, {0, 0, 5}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], Line[{q1, {0, 0, 0}}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[2] = 
              Show[Graphics3D[{{Text["Plot 2", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.02], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-5\), 0, 0}, {5, 0, 0}}], 
                    Line[{{0, \(-5\), 0}, {0, 5, 0}}], 
                    Line[{{0, 0, \(-5\)}, {0, 0, 5}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.03], Point[q2]}, 
                    Line[{q1, p1}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[3] = 
              Show[Graphics3D[{{Text["Plot 3", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.02], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-5\), 0, 0}, {5, 0, 0}}], 
                    Line[{{0, \(-5\), 0}, {0, 5, 0}}], 
                    Line[{{0, 0, \(-5\)}, {0, 0, 5}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.03], Point[q2], 
                      Point[q3]}, Line[{q1, p1}], Line[{q2, p2}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[4] = 
              Show[Graphics3D[{{Text["Plot 4", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.02], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-5\), 0, 0}, {5, 0, 0}}], 
                    Line[{{0, \(-5\), 0}, {0, 5, 0}}], 
                    Line[{{0, 0, \(-5\)}, {0, 0, 5}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.03], Point[q2], 
                      Point[q3]}, Line[{q1, p1}], Line[{q2, p2}], 
                    Line[{q3, p3}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[5] = 
              Show[Graphics3D[{{Text["Plot 5", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.015], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-6\), 0, 0}, {6, 0, 0}}], 
                    Line[{{0, \(-6\), 0}, {0, 6, 0}}], 
                    Line[{{0, 0, \(-6\)}, {0, 0, 6}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.03], Point[q2], 
                      Point[q3]}, Line[{q1, p1}], Line[{q2, p2}], 
                    Line[{q3, p3}], {PointSize[0.04], Point[q4x1], 
                      Point[q4x2]}, Line[{p4x1, q4x1}], Line[{p4x2, q4x2}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[6] = 
              Show[Graphics3D[{{Text["Plot 6", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.015], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-6\), 0, 0}, {6, 0, 0}}], 
                    Line[{{0, \(-6\), 0}, {0, 6, 0}}], 
                    Line[{{0, 0, \(-6\)}, {0, 0, 6}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.025], Point[q2], 
                      Point[q3]}, Line[{q1, p1}], Line[{q2, p2}], 
                    Line[{q3, p3}], {PointSize[0.035], Point[q4x1], 
                      Point[q4x2]}, Line[{p4x1, q4x1}], 
                    Line[{p4x2, q4x2}], {PointSize[0.04], Point[q5x1], 
                      Point[q5x2]}, Line[{p5x1, q5x1}], Line[{p5x2, q5x2}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[7] = 
              Show[Graphics3D[{{Text["Plot 7", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.015], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-6\), 0, 0}, {6, 0, 0}}], 
                    Line[{{0, \(-6\), 0}, {0, 6, 0}}], 
                    Line[{{0, 0, \(-6\)}, {0, 0, 6}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.02], Point[q2], 
                      Point[q3]}, Line[{q1, p1}], Line[{q2, p2}], 
                    Line[{q3, p3}], {PointSize[0.025], Point[q4x1], 
                      Point[q4x2]}, Line[{p4x1, q4x1}], 
                    Line[{p4x2, q4x2}], {PointSize[0.03], Point[q5x1], 
                      Point[q5x2]}, Line[{p5x1, q5x1}], 
                    Line[{p5x2, q5x2}], {PointSize[0.04], Point[q6x1], 
                      Point[q6x2]}, Line[{p6x1, q6x1}], Line[{p6x2, q6x2}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[8] = 
              Show[Graphics3D[{{Text["Plot 8", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.015], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-6\), 0, 0}, {6, 0, 0}}], 
                    Line[{{0, \(-6\), 0}, {0, 6, 0}}], 
                    Line[{{0, 0, \(-6\)}, {0, 0, 6}}], {PointSize[0.05], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.015], Point[q2], 
                      Point[q3]}, Line[{q1, p1}], Line[{q2, p2}], 
                    Line[{q3, p3}], {PointSize[0.02], Point[q4x1], 
                      Point[q4x2]}, Line[{p4x1, q4x1}], 
                    Line[{p4x2, q4x2}], {PointSize[0.025], Point[q5x1], 
                      Point[q5x2]}, Line[{p5x1, q5x1}], 
                    Line[{p5x2, q5x2}], {PointSize[0.03], Point[q6x1], 
                      Point[q6x2]}, Line[{p6x1, q6x1}], 
                    Line[{p6x2, q6x2}], {PointSize[0.04], Point[q7x1], 
                      Point[q7x2]}, Line[{p7x1, q7x1}], Line[{p7x2, q7x2}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]]; 
sh[9] = 
              Show[Graphics3D[{{Text["Plot 9", {0, 0, 0}, {5, 0}], \ 
                      PointSize[0.01], Point[pI1], Point[pI2], Point[qI]}, 
                    Line[{pI2, pI1}], Line[{{0, 0, 0}, p1}], 
                    Line[{{\(-6\), 0, 0}, {6, 0, 0}}], 
                    Line[{{0, \(-6\), 0}, {0, 6, 0}}], 
                    Line[{{0, 0, \(-6\)}, {0, 0, 6}}], {PointSize[0.03], 
                      Point[q1]}, Line[{qI, pI1}], 
                    Line[{q1, {0, 0, 0}}], {PointSize[0.01], Point[q2], 
                      Point[q3]}, Line[{q1, p1}], Line[{q2, p2}], 
                    Line[{q3, p3}], {PointSize[0.01], Point[q4x1], 
                      Point[q4x2]}, Line[{p4x1, q4x1}], 
                    Line[{p4x2, q4x2}], {PointSize[0.01], Point[q5x1], 
                      Point[q5x2]}, Line[{p5x1, q5x1}], 
                    Line[{p5x2, q5x2}], {PointSize[0.01], Point[q6x1], 
                      Point[q6x2]}, Line[{p6x1, q6x1}], 
                    Line[{p6x2, q6x2}], {PointSize[0.04], Point[q7x1], 
                      Point[q7x2]}, Line[{p7x1, q7x1}], Line[{p7x2, q7x2}]}, 
                  PlotRange -> {{\(-prange\), prange}, {\(-prange\), 
                        prange}, {\(-prange\), 
                        prange}}]];
, \(leer = 
                leer;\)];
];\)\)\)

kreisSchnitt[pm1_, pm2_, 
          rk1_, rk2_] := 
        Module[{kreis, mVec, xVec, x, y, rkI}, 
          Off[General::spell]; 
xVec[x_, y_] := {x, 
              y}; 
   
          If[var1Stop2Never3Use == 9,   Print[
              xVec[x99, y99] ] , leer = 
                leer;]; 
kreis[mVec_, 
              rkI_] := (xVec[x, y] - mVec) . (xVec[x, y] - mVec) - 
              rkI^2; 
   
          If[var1Stop2Never3Use == 9,  
            Print[kreis[mVec99, rkI99] ] , leer = 
                leer;]; 
solv = 
            Solve[{kreis[pm1, rk1] == 0,  
                kreis[pm2, rk2] == 0}, {x, 
                y}]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ solv] , leer = 
                leer;]; 
pSchnitt1 = {x, y} /. 
              solv[[1]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[pSchnitt1] , leer = 
                leer;]; 
pSchnitt2 = {x, y} /. 
              solv[[2]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[pSchnitt2] , leer = 
                leer;]; 
Print["Schnitpunkt 1: Punkt1 = \
 ",  pSchnitt1 , " = ", 
            pSchnitt1  // 
              N]; 
Print["Schnitpunkt 2: Punkt2 =  ",  
            pSchnitt2,  " = ", 
            pSchnitt2  // N]; 
{ pSchnitt1,  pSchnitt2} // 
            N
];

kugelSchnitt[pm1_, pm2_, 
          pm3_, rk1_, rk2_,  rk3_] := 
        Module[{kugel, mVec, xVec, x, y, z, rkI}, 
          Off[General::spell]; 
xVec[x_, y_, z_] := {x, y, 
              z}; 
   
          If[var1Stop2Never3Use == 9, 
            Print[xVec[x99, y99, z99]] , leer = 
                leer;]; 
kugel[mVec_, 
              rkI_] := (xVec[x, y, z] - mVec) . (xVec[x, y, z] - 
                    mVec) - rkI^2; 
   
          If[var1Stop2Never3Use == 9, 
            Print[kugel[mVec99, rkI99]] , leer = 
                leer;]; 
solv = 
            Solve[{kugel[pm1, rk1] == 0,  kugel[pm2, rk2] == 0, 
                kugel[pm3, rk3] == 0}, {x, y, 
                z}]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ solv] , leer = 
                leer;]; 
pSchnitt1 = {x, y, z} /. 
              solv[[1]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[pSchnitt1] , leer = 
                leer;]; 
pSchnitt2 = {x, y, z} /. 
              solv[[2]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[pSchnitt2] , leer = 
                leer;]; 
Print["Schnitpunkt 1: Punkt1 = \
 ",  pSchnitt1 , " = ", 
            pSchnitt1  // 
              N]; 
Print["Schnitpunkt 2: Punkt2 =  ",  
            pSchnitt2,  pSchnitt2, " = ", 
            pSchnitt2  // N]; 
{ pSchnitt1,  pSchnitt2} // 
            N
];

kugel2ebene1Schnitt[
          pm1_, pm2_, rk1_, rk2_,  pE1_, pE2_,  pE3_] := 
        Module[{kugel, mVec, xVec, x, y, z, rkI, ebene,  vec, pEI1, pEI2, 
            pEI3}, 
Off[
            General::spell]; 
xVec[x_, y_, z_] := {x, y, 
              z}; 
   
          If[var1Stop2Never3Use == 9, 
            Print[xVec[x99, y99, z99]] , leer = 
                leer;]; 
kugel[mVec_, 
              rkI_] := (xVec[x, y, z] - mVec) . (xVec[x, y, z] - 
                    mVec) - rkI^2; 
   
          If[var1Stop2Never3Use == 9, 
            Print[kugel[mVec99, rkI99]] , leer = leer;]; 
          ebene[vec_, pEI1_, pEI2_, pEI3_] := 
            Cross[(pEI2 - pEI1), (pEI3 - pEI1)] . (vec - 
                  pEI1); 
   
          If[var1Stop2Never3Use == 9, 
            Print[ebene[vec99, pEI199, pEI299, pEI399]] , leer = leer;]; 
          solv = Solve[{kugel[pm1, rk1] == 0,  
                kugel[pm2, rk2] == 0, 
                ebene[xVec[x, y, z], pE1, pE2, pE3] == 0}, {x, y, 
                z}]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[solv] , leer = 
                leer;]; 
pSchnitt1 = {x, y, z} /. 
              solv[[1]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[pSchnitt1] , leer = 
                leer;]; 
pSchnitt2 = {x, y, z} /. 
              solv[[2]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[pSchnitt2] , leer = 
                leer;]; 
Print["Schnitpunkt 1: Punkt1 = \
 ",  pSchnitt1 , " = ", 
            pSchnitt1  // 
              N]; 
Print["Schnitpunkt 2: Punkt2 =  ",  
            pSchnitt2,  " = ", 
            pSchnitt2  // N]; 
   
          If[var1Stop2Never3Use == 9, 
            Print["Exakt ", { pSchnitt1,  pSchnitt2} ], leer = 
                leer;];
];

kugel1ebene2Schnitt[
          pm1_, rk1_,  pE1_, pE2_,  pE3_,  qE1_, qE2_, qE3_] := 
        Module[{kugel, mVec, xVec, x, y, z, rkI, ebene,  vec, pEI1, pEI2, 
            pEI3}, 
Off[
            General::spell]; 
xVec[x_, y_, z_] := {x, y, 
              z}; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ xVec[x99, y99, z99]] , leer = 
                leer;]; 
kugel[mVec_, 
              rkI_] := (xVec[x, y, z] - mVec) . (xVec[x, y, z] - 
                    mVec) - rkI^2; 
   
          If[var1Stop2Never3Use == 9, 
            Print[kugel[mVec99, rkI99]] , leer = leer;]; 
          ebene[vec_, pEI1_, pEI2_, pEI3_] := 
            Cross[(pEI2 - pEI1), (pEI3 - pEI1)] . (vec - 
                  pEI1); 
   
          If[var1Stop2Never3Use == 9, 
            Print[ebene[vec99, pEI199, pEI299, pEI399]] , leer = leer;]; 
          solv = Solve[{kugel[pm1, rk1] == 0,  
                ebene[xVec[x, y, z], pE1, pE2, pE3] == 0,  
                ebene[xVec[x, y, z], qE1, qE2, qE3] == 0}, {x, y, 
                z}]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ solv] , leer = 
                leer;]; 
pSchnitt1 = {x, y, z} /. 
              solv[[1]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ pSchnitt1] , leer = 
                leer;]; 
pSchnitt2 = {x, y, z} /. 
              solv[[2]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ pSchnitt2] , leer = 
                leer;]; 
Print["Schnitpunkt 1: Punkt1 = \
 ",  pSchnitt1 , " = ", 
            pSchnitt1  // 
              N]; 
Print["Schnitpunkt 2: Punkt2 =  ",  
            pSchnitt2,  " = ", 
            pSchnitt2  // N]; 
   
          If[var1Stop2Never3Use == 9, 
            Print["Exakt ", { pSchnitt1,  pSchnitt2} ], leer = 
                leer;];
];

ebene3Schnitt[ pE1_, 
          pE2_,  pE3_,  qE1_, qE2_, qE3_,  uE1_, uE2_, uE3_] := 
        Module[{xVec, x, y, z, rkI, ebene,  vec, pEI1, pEI2, pEI3, 
            pSchnitt}, 
Off[
            General::spell]; 
xVec[x_, y_, z_] := {x, y, 
              z}; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ xVec[x99, y99, z99]] , leer = 
                leer;]; 
ebene[vec_, pEI1_, pEI2_, 
              pEI3_] := Cross[(pEI2 - pEI1), (pEI3 - 
                    pEI1)] . (vec - 
                  pEI1); 
   
          If[var1Stop2Never3Use == 9, 
            Print[ebene[vec99, pEI199, pEI299, pEI399]] , leer = leer;]; 
          solv = Solve[{
 
                ebene[xVec[x, y, z], pE1, pE2, pE3] == 0,  
                ebene[xVec[x, y, z], qE1, qE2, qE3] == 0, 
                ebene[xVec[x, y, z], uE1, uE2, uE3] == 0}, {x, y, 
                z}]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[solv] , leer = 
                leer;]; 
pSchnitt = {x, y, z} /. 
              solv[[1]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[pSchnitt] , leer = 
                leer;]; 
Print["Schnitpunkt : Punkt =  \
",  pSchnitt , " = ", 
            pSchnitt  // N]; 
   
          If[var1Stop2Never3Use == 9, 
            Print["Exakt ", 
              pSchnitt ], leer = 
                leer;];
];

gerade2Schnitt[ pG1_, 
          pG2_,  qG1_, qG2_] := 
        Module[{gerade, λ, μ, pGI1, 
            pGI2, λSchnitt, μSchnitt, pSchnitt1, 
            pSchnitt2}, 
Off[
            General::spell]; 
gerade[λ_, pGI1_, 
              pGI2_] := pGI1 + λ (pGI2 - 
                    pGI1); 
   
          If[var1Stop2Never3Use == 9, 
            Print[gerade[λ99, pGI199, pGI299]] , leer = 
                leer;]; 
solv = 
            Flatten[Solve[{
gerade[λ, pG1, 
                      pG2] ==  gerade[μ, qG1, 
                      qG2]}, {λ, μ}]]; 
   If[var1Stop2Never3Use == 9, 
            Print[ solv] , leer = 
                leer;]; 
λSchnitt = λ /. 
              solv[[1]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ λSchnitt] , leer = 
                leer;]; 
μSchnitt = μ /. 
              solv[[2]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ μSchnitt] , leer = leer;];  
          pSchnitt1 = 
            gerade[λSchnitt, pG1, 
              pG2]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ pSchnitt1] , leer = leer;]; 
          pSchnitt2 = 
            gerade[μSchnitt, qG1, qG2]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ pSchnitt2] , leer = 
                leer;]; 
Print["Schnittpunkt : Punkt =  \
",  pSchnitt1, " = ", 
            pSchnitt1  // N]; 
   
          If[var1Stop2Never3Use == 9, 
            Print["Exakt ", pSchnitt1, ",", 
              pSchnitt2 ], leer = 
                leer;];
];

\(\(\( (*\ 
      Modul\ 13\ *) \)\(
\)\(
\)\(geradeKreisSchnitt[\ 
          pG1_, pG2_, pm_, r_] := 
        Module[{gerade, λ, μ, pGI1, pGI2, kreis, mVec, xVec, x, 
            y, rkI}, 
Off[
            General::spell]; 
gerade[λ_, pGI1_, 
              pGI2_] := pGI1 + λ\ \((pGI2 - 
                    pGI1)\); 
xVec[x_, y_] := {x, 
              y}; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[\ xVec[x99, y99]]\ , \(leer = 
                leer;\)]; 
kreis[vec_, mVec_, 
              rkI_] := \((vec - mVec)\) . \((vec - mVec)\) - 
              rkI^2; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[kreis[vec99, mVec99, rkI99]]\ , \(leer = leer;\)]; 
          solv = Flatten[
              Solve[
kreis[{\(gerade[λ, pG1, 
                          pG2]\)[\([1]\)], \(gerade[λ, pG1, 
                          pG2]\)[\([2]\)]}, pm, r] == 
                  0, 
{λ}]]; 
 (*\ \ *) \ If[var1Stop2Never3Use == 9, 
            Print[\ solv]\ , \(leer = 
                leer;\)]; 
λSchnitt1 = λ /. 
              solv[\([1]\)]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[\ λSchnitt1]\ , \(leer = 
                leer;\)]; 
λSchnitt2 = λ /. 
              solv[\([2]\)]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[\ λSchnitt2]\ , \(leer = leer;\)]; 
          pSchnitt1 = 
            gerade[λSchnitt1, pG1, 
              pG2]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[\ pSchnitt1]\ , \(leer = leer;\)]; 
          pSchnitt2 = 
            gerade[λSchnitt2, pG1, 
              pG2]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[\ pSchnitt2]\ , \(leer = 
                leer;\)]; 
Print["Schnitpunkt : Punkt =  ", \ pSchnitt\ 1, " = ", 
            pSchnitt1\  // 
              N]; 
Print["Schnitpunkt : Punkt =  ", \ 
            pSchnitt\ 1, " = ", 
            pSchnitt2\  // N]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print["Exakt ", pSchnitt1, ",", 
              pSchnitt2\ ], \(leer = 
                leer;\)];
];\)\)\)

geradePunktAbstand[ 
          pG1_, pG2_, 
          pQ_] := 
Module[{gerade, aVec, xVec, x, y, vLen, 
            v, pGI2, pGI1, hP}, 
Off[
            General::spell]; 
vLen[v_] := 
            Sqrt[v . v]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[vLen[v99]] , leer = leer;]; 
xVec[
              x_, y_] := {x, y}; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ xVec[x99, y99]] , leer = leer;]; 
          aVec[pGI2_, pGI1_] := pGI2 - pGI1; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ aVec[pGI299, pGI199]] , leer = leer;]; 
          nVec[v_] := {-v[[2]], 
              v[[1]]}; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ nVec[v199, v299]] , leer = leer;]; 
          gerade[pGI1_, pGI2_, x_, y_] := 
            nVec[aVec[pG1, pG2]] . (xVec[x, y] - pG1)/
              vLen[nVec[aVec[pG1, pG2]]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ gerade[pGI199, pGI299, x99, y99]] , leer = leer;]; 
          hP = gerade[pG1, pG2, pQ[[1]], 
              pQ[[2]]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[hP] , leer = 
                leer;]; 
Print["Abstand : Punkt-Gerade \
=  ",  hP, " = ", hP  // N]; 
   
          If[var1Stop2Never3Use == 9, 
            Print["Exakt ", hP, ",", 
              hP ], leer = leer;];
];

ebenePunktAbstand[ 
          pG1_, pG2_,  pG3_, 
          pQ_] := 
Module[
{ebene, aVec, 
            xVec, x, y, vLen, v1, v2, pGI1, pGI2, pGI3, pGI4, pGI5, 
            hP}, 
Off[
            General::spell]; 
vLen[v_] := 
            Sqrt[v . v]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[vLen[v99]] , leer = leer;]; 
xVec[
              x_, y_, z_] := {x, y, z}; 
   
          If[var1Stop2Never3Use == 9, 
            Print[xVec[x99, y99, z99]] , leer = leer;]; 
          dVec[pGI4_, pGI5_] := pGI4 - pGI5; 
   
          If[var1Stop2Never3Use == 9, 
            Print[dVec[pGI499, pGI599]] , leer = 
                leer;]; 
nVec[v1_, v2_] := 
            Cross[v1, v2]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[nVec[v1499, v2599]] , leer = leer;]; 
          ebene[pGI1_, pGI2_, pGI3_, x_, y_, z_] := 
            nVec[dVec[pGI1, pGI2], 
                  dVec[pGI1, pGI3]] . (xVec[x, y, z] - pGI1)/
              vLen[nVec[dVec[pG1, pG2], 
                  dVec[pG1, pG3]]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[ebene[pGI199, pGI299, pGI399, x99, y99, z99]] , leer = 
                leer;]; 
hP = 
            ebene[pG1, pG2, p3, pQ[[1]], pQ[[2]], 
              pQ[[3]]]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[hP] , leer = 
                leer;]; 
Print["Abstand : Punkt-Ebene = \
 ",  hP, " = ", hP  // N]; 
   
          If[var1Stop2Never3Use == 9, 
            Print["Exakt ", hP, ",", 
              hP ], leer = leer;];
];

\(\(\( (*\ 
      Modul\ 16\ *) \)\(
\)\(
\)\(mittelpunktStrecke[\ 
          pG1_, pG2_] := 
Module[
{mP}, 
Off[
            General::spell1]; 
mP = \((pG1 + pG2)\)/
              2; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[mP]\ , \(leer = 
                leer;\)]; 
Print["Mittelpunkt der Strecke =  ", mP, " = ", mP\  // N];
];\)\)\)

\(\(\( (*\ 
      Modul\ 17\ *) \)\(
\)\(
\)\(mittelsenkrechte[\ pG1_, 
          pG2_] := 
Module[
{hP1, hP2, 
            punkt, qI1, qI2, φ}, 
Off[
            General::spell]; 
punkt[pI1_, 
              pI2_, φ_] := \(({{Cos[φ\ Degree], \(-Sin[φ\ Degree]\)}, {Sin[φ\ Degree], 
                      Cos[φ\ Degree]}} . \((pI2 - pI1)\))\) + 
              pI1; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[punkt[pI199, pI299, φ99]\ ], \(leer = 
                leer;\)]; 
hP1 = 
            punkt[\((\ pG1 + pG2)\)/2, pG2, 
              90]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[hP1], \(leer = leer;\)]; 
hP2 = 
            punkt[\((\ pG1 + pG2)\)/2, 
              pG2, \(-90\)]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[hP1], \(leer = 
                leer;\)]; 
Print["Punkte der Mittelsenkrechten =  ", {\ hP1, hP2}, " = ", {\ hP1, hP2}\  // 
              N];
];\)\)\)

winkelhalbierende[pO_ , 
          pG1_, pG2_] := 
Module[
{vLen, 
            hW}, 
Off[
            General::spell]; 
vLen[v_] := 
            Sqrt[v . v]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[vLen[v99]] , leer = leer;]; 
hW = 
            pO + (pG1 - pO) 1/vLen[(pG1 - pO)] + (pG2 - pO) 1/
                  vLen[(pG2 - pO)]; 
   
          If[var1Stop2Never3Use == 9, 
            Print[hW] , leer = leer;]; 
If[
            Det[{pO - pG1, p0 - pG2}] == 0,  
            hW = {(-pO + pG1)[[2]], (pO - pG1)[[1]]};  
            Print["Punkte auf einer Geraden"], 
            leer = leer]; 
Print["Punkte der \
Winkelhalbierenden =  ", { pO, hW}, " = ", {pO, hW}  // 
              N];
];

\(\(\( (*\ 
      Modul\ 19\ *) \)\(
\)\(
\)\(lotFussPunktGerade[pG1_, 
          pG2_, pQ_] := 
Module[
{g1, 
            g2, λ, punkt, pI1, pI2, φ, pQ1, solv, pL1, 
            pL2}, 
Off[
            General::spell]; 
g1[λ_] := 
            pG1 + \ λ\ \((pG2 - 
                    pG1)\); 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[g1[λ99]]\ , \(leer = 
                leer;\)]; 
punkt[pI1_, 
              pI2_, φ_] := \(({{Cos[φ\ Degree], \(-Sin[φ\ Degree]\)}, {Sin[φ\ Degree], 
                      Cos[φ\ Degree]}} . \((pI2 - pI1)\))\) + 
              pI1; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[punkt[pI199, pI299, φ99]]\ , \(leer = 
                leer;\)]; 
pQ1 = 
            punkt[pG1, pG2, 90]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[pQ1]\ , \(leer = leer;\)]; 
g2[μ_] := 
            pQ + μ\ \((pQ1 - pG1)\); 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[g2[μ99]]\ , \(leer = leer;\)]; 
          solv = Flatten[
              Solve[g1[λ] == 
                  g2[μ], {λ, μ}]]; 
 (*\ \ *) \ If[var1Stop2Never3Use == 9, 
            Print[solv]\ , \(leer = leer;\)]; 
pL1 = 
            g1[λ] /. {solv[\([1]\)]}; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[pL1]\ , \(leer = leer;\)]; 
pL2 = 
            g2[μ] /. {solv[\([2]\)]}; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[pL2]\ , \(leer = 
                leer;\)]; 
Print["Lotfusspunkt =  ", 
            pL1, " = ", pL1\  // N]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print["Exakt: ", 
              pL2]\ , \(leer = leer;\)];
];\)\)\)

\(\(\( (*\ 
      Modul\ 20\ *) \)\(
\)\(
\)\(lotFussPunktEbene[pG1_, 
          pG2_, pG3_, 
          pQ_] := 
Module[
{ebene, λ, μ, n, g, solv, pL1, 
            pL2}, 

Off[
            General::spell]; 
ebene[λ_, μ_] := 
            pG1 + \ λ\ \((pG2 - pG1)\) + μ \((pG3 - 
                    pG1)\); 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[ebene[λ99, μ99]]\ , \(leer = 
                leer;\)]; 
n = 
            Cross[\((pG2 - pG1)\), \((pG3 - 
                  pG1)\)]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[n]\ , \(leer = leer;\)]; 
g[ν_] := 
            pQ + ν\ n; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[g[ν99]]\ , \(leer = leer;\)]; 
          solv = Flatten[
              Solve[ebene[λ, μ] == 
                  g[ν], {λ, μ, ν}]]; 
 (*\ \ *) \ If[var1Stop2Never3Use == 9, 
            Print[solv]\ , \(leer = leer;\)]; 
          pL1 = ebene[λ, μ] /. {solv[\([1]\)], 
                solv[\([2]\)]}; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[pL1]\ , \(leer = leer;\)]; 
pL2 = 
            g[ν] /. {solv[\([3]\)]};  (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[pL2]\ , \(leer = 
                leer;\)]; 
Print["Lotfusspunkt =  ", 
            pL1, " = ", pL1\  // N]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print["Exakt: ", 
              pL2]\ , \(leer = leer;\)];
];\)\)\)

\(\(\( (*\ 
      Modul\ *) \)\(
\)\(
\)\(winkelFussPunktGerade[pG1_, pG2_, 
          pQ_, α_] := 
Module[
{g, λ, v, v1, v2, vLen, solv, pL, 
            alpha}, 

Off[
            General::spell]; 
vLen[v_] := 
            Sqrt[v . v]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[vLen[v99]]\ , \(leer = 
                leer;\)]; 
g[λ_] := 
            pG1 + \ λ\ \((pG2 - 
                    pG1)\); 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[g[λ99]]\ , \(leer = 
                leer;\)]; 
v1[λ_] := 
            g[λ] - pQ; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[v1[λ99]]\ , \(leer = 
                leer;\)]; 
v2 = 
            pG2 - pG1; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[v2]\ , \(leer = leer;\)]; 
alpha = 
            2\ Pi\ α\ \ /360\ ; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print[alpha]\ , \(leer = leer;\)]; 
          solv = Flatten[
              Solve[Cos[
                      alpha]^2 == \((\((v1[λ] . 
                            v2)\)/\((vLen[v1[λ]]\ \ vLen[
                              v2])\))\)^2, {λ}]]; 
 (*\ \ *) \ If[var1Stop2Never3Use == 9, 
            Print[solv]\ , \(leer = leer;\)]; 
pL1 = 
            g[λ] /. 
              solv[\([1]\)]; 
Print["Punkt =  ", 
            pL1, " = ", pL1\  // N]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print["Exakt: ", \ 
              pL1]\ , \(leer = leer;\)]; 
pL2 = 
            g[λ] /. 
              solv[\([2]\)]; 
Print["Punkt =  ", 
            pL2, " = ", pL2\  // N]; 
 (*\ \ *) \ 
          If[var1Stop2Never3Use == 9, 
            Print["Exakt: ", \ pL2]; 
Show[
              Graphics[{PointSize[0.03], Point[pG1], Point[pG2], Point[pQ], 
                  Line[{pG1, pG2}], PointSize[0.05], Point[pL1], Point[pL2], 
                  Line[{pQ, pL1}], Line[{pQ, pL2}]}, 
                AspectRatio -> Automatic]];\ , \(leer = 
                leer;\)];
];\)\)\)