_________________________________________________________________________ Title: Gravity Center Calculator Author: Mats Forsén Written by: Mats Forsén Description: Calculates gravity center in easy 2D-objects only! (yet) Remarks: Version 1.0 for fx7700-GE. Size: XX Bytes _________________________________________________________________________ Command translation: -> Single arrow (located on the keyboard) => Double arrow (press: [shift] [prgm] [f1] [f1]) _ Display, -Disp- (press: [shift] [prgm] [f4]) <= Less or equal (A <= B) >= Greater or equal (A >= B) <> Not equal (A <> B) ^ Raised to the power of / Division or fraction (explain which with a comment) 2rt() Root (2rt(7) is the square root of 7) _________________________________________________________________________ Refer to the command standard used in R20_CASIO and set by Magnus Werner on SilverSTone BBS (2:201/345@fidonet.org). Everything after a ; is a comment and should not be in the code. _________________________________________________________________________ Program: 'GRAV' 0->A~Z Lbl 1 " " "NUMBER OF PARTS"?->Z Z>=6=>"TOO MANY" ;Greater or Equal Z>=6=>Goto 1 "A1"?->A ; Input Area of part 1 (If hole then negative area) "X1"?->B ; Input distance in X coords. (from established point) "Y1"?->C ; Input distance in Y coords. Z>=2=>"A2"?->D Z>=2=>"X2"?->E Z>=2=>"Y2"?->F Z>=3=>"A3"?->G Z>=3=>"X3"?->H Z>=3=>"Y3"?->I Z>=4=>"A4"?->J Z>=4=>"X4"?->K Z>=4=>"Y4"?->L Z>=5=>"A5"?->M Z>=5=>"X5"?->N Z>=5=>"Y5"?->O "X" ;Displays distance to gravity center in X coords. (A*B+D*E+G*H+J*K+M*N)/(A+D+G+J+M)_ ; Division, Disp! "Y" ;Distance to center in Y Coords. (A*C+D*F+G*I+J*L+M*N)/(A+D+G+J+M)_ ;Division!, Disp! _________________________________________________________________________ If you need help or information concerning this file, please contact Mats Forsén at one of the following adresses. E-Mail : t95forsm@ava.taby.se WWW : http://elev.ava.taby.se/~t95forsm/programming/ _________________________________________________________________________