Quellcode-Bibliothek
© Kompilation durch diese Firma
[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]
Datei:
texinfo.xml
Sprache: Unknown
identification division.
program-id. Pentaeder4D.
* 4D-Pentaeder mit Parametern
* die Punkte seien d1 .. d6 voneinander entfernt
* wie berechnen sich die Punkte?.
author. "JD".
date-written. 6.4.2009.
date-compiled.
data division.
working-storage section.
77 x1 pic 9(4)V9(4) comp.
77 x2 pic 9(4)V9(4) comp.
77 x3 pic 9(4)V9(4) comp.
77 x4 pic 9(4)V9(4) comp.
77 y1 pic 9(4)V9(4) comp.
77 y2 pic 9(4)V9(4) comp.
77 y3 pic 9(4)V9(4) comp.
77 y4 pic 9(4)V9(4) comp.
77 z1 pic 9(4)V9(4) comp.
77 z2 pic 9(4)V9(4) comp.
77 z3 pic 9(4)V9(4) comp.
77 z4 pic 9(4)V9(4) comp.
77 t1 pic 9(4)V9(4) comp.
77 t2 pic 9(4)V9(4) comp.
77 t3 pic 9(4)V9(4) comp.
77 t4 pic 9(4)V9(4) comp.
linkage section.
77 d1 pic 9(4)V9(4) comp.
77 d2 pic 9(4)V9(4) comp.
77 d3 pic 9(4)V9(4) comp.
77 d4 pic 9(4)V9(4) comp.
77 d5 pic 9(4)V9(4) comp.
77 d6 pic 9(4)V9(4) comp.
77 l1 pic 9(4)V9(4) comp.
77 l2 pic 9(4)V9(4) comp.
77 l3 pic 9(4)V9(4) comp.
77 l4 pic 9(4)V9(4) comp.
77 l5 pic 9(4)V9(4) comp.
procedure division using d1 d2 d3 d4 d5 d6 l1 l2 l3 l4 l5.
* di**2=(xi-xj)**2+(yi-yj)**2+(zi-zj)**2+(ti-tj)**2
* 1 - 2
compute d1= (x1-x2)**2
+(y1-y2)**2
+(z1-z2)**2
+(t1-t2)**2
* 1 - 3
compute d2= (x1-x3)**2
+(y1-y3)**2
+(z1-z3)**2
+(t1-t3)**2
* elim x1**2
compute l1=d2-d1
* 2 - 3
compute d3= (x2-x3)**2
+(y2-y3)**2
+(z2-z3)**2
+(t2-t3)**2
* elim x2**2
* compute l2=l1+d3
* 3 - 4
* compute d3= (x3-x4)**2
* +(y3-y4)**2
* +(z3-z4)**2
* +(t3-t4)**2
* elim x3**2
* compute l3=l2-d4
* 4 - 1
* compute d3= (x4-x1)**2
* +(y4-y1)**2
* +(z4-z1)**2
* +(t4-t1)**2
* elim x4**2
* compute l4=l3+d5
* 2 - 4
* compute d3= (x2-x4)**2
* +(y2-y4)**2
* +(z2-z4)**2
* +(t2-t4)**2
* elim y4**2
* compute l5=l4+d6
end-program Pentaeder4D.
[ zur Elbe Produktseite wechseln0.1Quellennavigators
Analyse erneut starten
]
|
|