-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vektor.txt
86 lines (86 loc) · 4.73 KB
/
Vektor.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#Program name: Vektor
#Password: <no password>
Norm 1
Lbl 0
ClrText
Menu "Vektor", "Vektor aus Punkten", 1, "Punkt aus Vektor", 2, "Vektorlänge", 3, "Lineare Abhängigkeit", 4, "Einheitsvektor", 5, "Dreiecksfläche", 6, "Version", 7
Lbl 1
"x Punkt A"? -> A : "y Punkt A"? -> B : "z Punkt A"? -> C : ClrText
"x Punkt B"? -> D : "y Punkt B"? -> E : "z Punkt B"? -> F : ClrText
Locate 1, 1, "-->" : Locate 1, 2, "AB=" : Locate 5, 1, D - A : Locate 5, 2, E - B : Locate 5, 3, F - C
Locate 11, 1, "-->" : Locate 11, 2, "BA=" : Locate 15, 1, A - D : Locate 15, 2, B - E : Locate 15, 3, C - F
Locate 1, 4, "AB=√x²+y²+z²" : Locate 1, 5, "AB=" : Locate 4, 5, √((D - A) ^ 2 + (E - B) ^ 2 + (F - C) ^ 2)
Locate 2, 6, "A(" : Locate 4, 6, A : Locate 8, 6, "|" : Locate 9, 6, B : Locate 13, 6, "|" : Locate 14, 6, C : Locate 18, 6, ")"
Locate 2, 7, "B(" : Locate 4, 7, D : Locate 8, 7, "|" : Locate 9, 7, E : Locate 13, 7, "|" : Locate 14, 7, F : Locate 18, 7, ")"
Goto K
Lbl 2
"x Punkt A"? -> A : "y Punkt A"? -> B : "z Punkt A"? -> C : ClrText
"x Vektor"? -> D : "y Vektor"? -> E : "z Vektor"? -> F : ClrText
Locate 2, 2, "A(" : Locate 4, 2, A : Locate 8, 2, "|" : Locate 9, 2, B : Locate 13, 2, "|" : Locate 14, 2, C : Locate 18, 2, ")"
Locate 2, 3, "B(" : Locate 4, 3, A + D : Locate 8, 3, "|" : Locate 9, 3, B + E : Locate 13, 3, "|" : Locate 14, 3, C + F : Locate 18, 3, ")"
Locate 2, 5, "-->" : Locate 2, 6, "AB=" : Locate 6, 5, D : Locate 6, 6, E : Locate 6, 7, F
Locate 10, 5, "AB=√x²+y²+z²" : Locate 10, 6, "AB=" : Locate 13, 6, √((D) ^ 2 + (E) ^ 2 + (F) ^ 2)
Goto K
Lbl 3
"x Vektor"? -> A : "y Vektor"? -> B : "z Vektor"? -> C : ClrText
Locate 2, 2, "-->" : Locate 2, 3, "AB=" : Locate 6, 2, A : Locate 6, 3, B : Locate 6, 4, C
Locate 2, 6, "AB=√x²+y²+z²" : Locate 2, 7, "AB=" : Locate 5, 7, √((A) ^ 2 + (B) ^ 2 + (C) ^ 2)
Goto K
Lbl 4
ClrText
Menu "Lineare Abhängigkeit", "x-y-Ebene", 8, "x-y-z Ebene", 9, "Zurück", 0
Lbl 8
"x Vektor 1"? -> A : "y Vektor 1"? -> B : ClrText
"x Vektor 2"? -> C : "y Vektor 2"? -> D : ClrText
A / B -> E : C / D -> F
Locate 1, 1, "-->" : Locate 1, 2, "AB=" : Locate 5, 1, A : Locate 5, 2, B
Locate 11, 1, "-->" : Locate 11, 2, "CD=" : Locate 15, 1, C : Locate 15, 2, D
Locate 2, 4, "x₁ * t = x₂"
If E = F : Then Locate 2, 5, "Linear Abhängig" : Locate 2, 6, "t = " : Locate 6, 6, E : IfEnd
If E != F : Then Locate 2, 5, "Linear Unabhängig" : IfEnd
Goto L
Lbl 9
"x Vektor 1"? -> A : "y Vektor 1"? -> B : "z Vektor 1"? -> C : ClrText
"x Vektor 2"? -> D : "y Vektor 2"? -> E : "z Vektor 2"? -> F : ClrText
"x Vektor 3"? -> G : "y Vektor 3"? -> H : "x Vektor 3"? -> I : ClrText
A * E * I + D * H * C + G * B * F - C * E * G - F * H * A - I * B * D -> J
Locate 1, 1, "->" : Locate 1, 2, "a=" : Locate 3, 1, A : Locate 3, 2, B : Locate 3, 3, C
Locate 8, 1, "->" : Locate 8, 2, "b=" : Locate 10, 1, D : Locate 10, 2, E : Locate 10, 3, F
Locate 15, 1, "->" : Locate 15, 2, "c=" : Locate 17, 1, G : Locate 17, 2, H : Locate 17, 3, I
If J = 0 : Then Locate 2, 5, "Linear Abhängig" : IfEnd
If J != 0 : Then Locate 2, 5, "Linear Unabhängig" : IfEnd
Goto L
Lbl 5
"x Vektor"? -> A : "y Vektor"? -> B : "z Vektor"? -> C : ClrText
Locate 2, 2, "-->" : Locate 2, 3, "AB=" : Locate 6, 2, A : Locate 6, 3, B : Locate 6, 4, C
√((A) ^ 2 + (B) ^ 2 + (C) ^ 2) -> L
Locate 2, 5, "-->" : Locate 2, 6, "AB=" : Locate 7, 5, A * (1 / L) : Locate 7, 6, B * (1 / L) : Locate 7, 7, C * (1 / L)
Goto K
Lbl 6
Deg : Norm 1
"x Punkt A"? -> A : "y Punkt A"? -> B : "z Punkt A"? -> C : ClrText
"x Punkt B"? -> D : "y Punkt B"? -> E : "z Punkt B"? -> F : ClrText
"x Punkt C"? -> G : "y Punkt C"? -> H : "z Punkt C"? -> I : ClrText
' sides a, b and c
√((D - A) ^ 2 + (E - B) ^ 2 + (F - C) ^ 2) -> L
√((G - A) ^ 2 + (H - B) ^ 2 + (I - C) ^ 2) -> K
√((G - D) ^ 2 + (H - E) ^ 2 + (I - F) ^ 2) -> J
' angle gamma
((J) ^ 2 - ((K) ^ 2 + (L) ^ 2)) / ( - 2 * L * K) -> M
Locate 2, 6, "Area ="
Locate 9, 6, .5 * L * K * sin acos M
Locate 2, 2, "A(" : Locate 4, 2, A : Locate 8, 2, "|" : Locate 9, 2, B : Locate 13, 2, "|" : Locate 14, 2, C : Locate 18, 2, ")"
Locate 2, 3, "B(" : Locate 4, 3, D : Locate 8, 3, "|" : Locate 9, 3, E : Locate 13, 3, "|" : Locate 14, 3, F : Locate 18, 3, ")"
Locate 2, 4, "C(" : Locate 4, 4, G : Locate 8, 4, "|" : Locate 9, 4, H : Locate 13, 4, "|" : Locate 14, 4, I : Locate 18, 4, ")"
Goto K
Lbl 7
Locate 3, 1, ">> Versioninfo <<" : Locate 8, 2, "V 1.4" : Locate 7, 3, "(c) 2024" : Locate 3, 3, "Felix Wittwer FW" : Locate 1, 5, "https:github.com" : Locate 9, 6, "felixwittwer"
Stop
Lbl K
0 -> K
Do : GetKey -> K : LpWhile K = 0
If K = 31 : Then Goto 0
Lbl L
0 -> K
Do : GetKey -> K : LpWhile K = 0
If K = 31 : Then Goto 4