Parallelprojektionen eines Würfels

Werner Knobloch, 2012

Anwendung von Abbildungsmatrizen in homogener Koordinatenschreibweise

Körperdrehung

Systemdrehung

homogen = true
Eckliste_0: {{1, 1, 1, 1}, {1, 1, -1, 1}, {1, -1, -1, 1}, {1, -1, 1, 1}, {-1, 1, 1, 1}, {-1, 1, -1, 1}, {-1, -1, -1, 1}, {-1, -1, 1, 1}}
Eckenzahl = Length(Eckliste_0)
α = 3.5604716740684323 rad (slider from 0 to 6.28318530717959, step 1*°)
R_x: {{1, 0, 0, 0}, {0, cos(α), (-sin(α)), 0}, {0, sin(α), cos(α), 0}, {0, 0, 0, 1}}
β = 2.1642082724729685 rad (slider from 0 to 6.28318530717959, step 1*°)
R_y: {{cos(β), 0, sin(β), 0}, {0, 1, 0, 0}, {(-sin(β)), 0, cos(β), 0}, {0, 0, 0, 1}}
γ = 3.2114058236695664 rad (slider from 0 to 6.28318530717959, step 1*°)
R_z: {{cos(γ), (-sin(γ)), 0, 0}, {sin(γ), cos(γ), 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}
R_{xyz}: ((R_x * R_y) * R_z)
Zoom_{Körper} = 0.5 (slider from 0.2 to 5, step 0)
R_{Zoom1}: {{Zoom_{Körper}, 0, 0, 0}, {0, Zoom_{Körper}, 0, 0}, {0, 0, Zoom_{Körper}, 0}, {0, 0, 0, 1}}
α1 = 3.857177646907468 rad (slider from 0 to 6.28318530717959, step 1*°)
S_x: {{1, 0, 0, 0}, {0, cos(α1), (-sin(α1)), 0}, {0, sin(α1), cos(α1), 0}, {0, 0, 0, 1}}
β1 = 1.9373154697137058 rad (slider from 0 to 6.28318530717959, step 1*°)
S_y: {{cos(β1), 0, sin(β1), 0}, {0, 1, 0, 0}, {(-sin(β1)), 0, cos(β1), 0}, {0, 0, 0, 1}}
γ1 = 4.642575810304916 rad (slider from 0 to 6.28318530717959, step 1*°)
S_z: {{cos(γ1), (-sin(γ1)), 0, 0}, {sin(γ1), cos(γ1), 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}
S_{xyz}: ((S_x * S_y) * S_z)
Zoom_{System} = 2.3 (slider from 0.2 to 3, step 0.01)
R_{Zoom2}: {{Zoom_{System}, 0, 0, 0}, {0, Zoom_{System}, 0, 0}, {0, 0, Zoom_{System}, 0}, {0, 0, 0, 1}}
distanz = 1.7 (slider from 1 to 5, step 0.1)
P_{xy}: {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0, 1}}
Start = (5.281928963719381, -2.1498335302764358)
Text1 = LaTeX(R_x, true, true)
Text2 = LaTeX(R_y, true, true)
Text3 = LaTeX(R_z, true, true)
e1: {{1}, {0}, {0}, {1}}
e2: {{0}, {1}, {0}, {1}}
e3: {{0}, {0}, {1}, {1}}
SZoom_{xyz}: (R_{Zoom2} * S_{xyz})
e1': (SZoom_{xyz} * e1)
e2': (SZoom_{xyz} * e2)
e3': (SZoom_{xyz} * e3)
e1'': (P_{xy} * e1')
e2'': (P_{xy} * e2')
e3'': (P_{xy} * e3')
Text4 = LaTeX(S_x, true, true)
Text5 = LaTeX(S_y, true, true)
Text6 = LaTeX(S_z, true, true)
U: (Element[Join[e1''], 1], Element[Join[e1''], 2])
V: (Element[Join[e2''], 1], Element[Join[e2''], 2])
W: (Element[Join[e3''], 1], Element[Join[e3''], 2])
O = (0, 0)
u = Vector(O, U)
v = Vector(O, V)
w = Vector(O, W)
A1: (-distanz)
B1: (-distanz)
A2: distanz
B2: (-distanz)
C2: (-distanz)
A3: distanz
B3: distanz
C3: (-distanz)
A4: (-distanz)
B4: distanz
C4: (-distanz)
A5: (-distanz)
B5: (-distanz)
C5: distanz
A6: distanz
B6: (-distanz)
C6: distanz
A7: (-distanz)
B7: distanz
C7: distanz
C1: (-distanz)
Pol_Eck1: (A1 * u) + (B1 * v) + (C1 * w) + Start
Pol_Eck2: (A2 * u) + (B2 * v) + (C2 * w) + Start
Pol_Eck3: (A3 * u) + (B3 * v) + (C3 * w) + Start
Pol_Eck4: (A4 * u) + (B4 * v) + (C4 * w) + Start
Pol_Eck5: (A5 * u) + (B5 * v) + (C5 * w) + Start
Pol_Eck6: (A6 * u) + (B6 * v) + (C6 * w) + Start
Pol_Eck7: (A7 * u) + (B7 * v) + (C7 * w) + Start
Vieleck7, a, b, c, d = Polygon(Pol_Eck1, Pol_Eck2, Pol_Eck6, Pol_Eck5)
Vieleck8, pol_eck7, pol_eck5, pol_eck1, pol_eck4 = Polygon(Pol_Eck7, Pol_Eck5, Pol_Eck1, Pol_Eck4)
Vieleck9, pol_1, pol_2, pol_eck2, pol_eck3 = Polygon(Pol_Eck4, Pol_Eck1, Pol_Eck2, Pol_Eck3)
z = Vector(O, Start)
Start_u = Translate(Start, u)
e = Vector(Start, Start_u)
Start'_v = Translate(Start, v)
f = Vector(Start, Start'_v)
Start'_w = Translate(Start, w)
g = Vector(Start, Start'_w)
P_{distanz,y,z}: {{0, 0, 0, (-distanz)}, {0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}}
P_{x,distanz,z}: {{1, 0, 0, 0}, {0, 0, 0, (-distanz)}, {0, 0, 1, 0}, {0, 0, 0, 1}}
P_{x,y,distanz}: {{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0, (-distanz)}, {0, 0, 0, 1}}
Eckliste = Sequence(Sequence[{Element[Element[Eckliste_0, j], i]}, i, 1, 3 + homogen], j, 1, Eckenzahl)
RZoom_{xyz}: (R_{Zoom1} * R_{xyz})
Eckliste' = Sequence((RZoom_{xyz} * Element[Eckliste, i]), i, 1, Eckenzahl)
Polygonindexliste: {{4, 1, 2, 3, 4}, {4, 5, 6, 7, 8}, {4, 1, 4, 8, 5}, {4, 2, 3, 7, 6}, {4, 4, 3, 7, 8}, {4, 1, 2, 6, 5}}
Eckliste'' = Sequence((((P_{xy} * SZoom_{xyz}) * RZoom_{xyz}) * Element[Eckliste, i]), i, 1, Eckenzahl)
PEckliste'' = Sequence((Element[Join[Element[Eckliste'', i]], 1], Element[Join[Element[Eckliste'', i]], 2]) + Start, i, 1, Eckenzahl)
Proj_y = Sequence(((SZoom_{xyz} * P_{x,distanz,z}) * Element[Eckliste', j]), j, 1, Eckenzahl)
Proj_x = Sequence(((SZoom_{xyz} * P_{distanz,y,z}) * Element[Eckliste', j]), j, 1, Eckenzahl)
Proj_z = Sequence(((SZoom_{xyz} * P_{x,y,distanz}) * Element[Eckliste', j]), j, 1, Eckenzahl)
PRroj_x = Sequence((Element[Join[Element[Proj_x, i]], 1], Element[Join[Element[Proj_x, i]], 2]) + Start, i, 1, Eckenzahl)
PRroj_y = Sequence((Element[Join[Element[Proj_y, i]], 1], Element[Join[Element[Proj_y, i]], 2]) + Start, i, 1, Eckenzahl)
PRroj_z = Sequence((Element[Join[Element[Proj_z, i]], 1], Element[Join[Element[Proj_z, i]], 2]) + Start, i, 1, Eckenzahl)
Eckpunkte = false
Deckkraft_{Projektion} = 0.35 (slider from 0 to 1, step 0.01)
Würfelanimation = false
Systemanimation = false
Speed = 0.1 (slider from 0 to 1, step 0.1)
Deckkraft_{Körper} = 0 (slider from 0 to 1, step 0.1)
Strahlen_x = Sequence(Segment[Element[PEckliste'', i], Element[PRroj_x, i]], i, 1, Eckenzahl)
Strahlen_y = Sequence(Segment[Element[PEckliste'', i], Element[PRroj_y, i]], i, 1, Eckenzahl)
Strahlen_z = Sequence(Segment[Element[PEckliste'', i], Element[PRroj_z, i]], i, 1, Eckenzahl)
Projektionsstrahlen = true
Text10 = LaTeX(P_{distanz,y,z}, true, true)
Text11 = LaTeX(P_{x,distanz,z}, true, true)
Text12 = LaTeX(P_{x,y,distanz}, true, true)
Dreibeine = true
Polygonzahl = Length(Polygonindexliste)
Polygonliste = Sequence(Polygon[Sequence[Element[PEckliste'', Element[Element[Polygonindexliste, i], j + 1]], j, 1, Element[Element[Polygonindexliste, i], 1]]], i, 1, Polygonzahl)
Polyy = Sequence(Polygon[Sequence[Element[PRroj_y, Element[Element[Polygonindexliste, i], j + 1]], j, 1, Element[Element[Polygonindexliste, i], 1]]], i, 1, Polygonzahl)
Polyx = Sequence(Polygon[Sequence[Element[PRroj_x, Element[Element[Polygonindexliste, i], j + 1]], j, 1, Element[Element[Polygonindexliste, i], 1]]], i, 1, Polygonzahl)
Polyz = Sequence(Polygon[Sequence[Element[PRroj_z, Element[Element[Polygonindexliste, i], j + 1]], j, 1, Element[Element[Polygonindexliste, i], 1]]], i, 1, Polygonzahl)