HP Articles Forum
[Return to the Index ]
[ Previous | Next ]
HP-35S Triangle solve program
Posted by Caspar L on 24 July 2008, 4:36 p.m.
My first go at a 35S program (see FEM48/49 at hpcalc.org for a more elaborate program of mine) and my first posting here.
T001 LBL T T002 CLx T003 SF10 T004 EQN 1SSS 2SAS 3ASA4SAA 5SSA 6SSA T005 x=0? T006 GTO T108 T007 1 T008 x=y? T009 GTO T032 T010 R Down T011 2 T012 x=y? T013 GTO T039 T014 R Down T015 3 T016 x=y? T017 GTO T046 T018 R Down T019 4 T020 x=y? T021 GTO T053 T022 R Down T023 5 T024 x=y? T025 GTO T060 T026 R Down T027 6 T028 x=y? T029 GTO T062 T030 EQN INVALID CMD T031 GTO T001 T032 EQN ENTER S1 T033 STO R T034 EQN ENTER S2 T035 STO S T036 EQN ENTER S3 T037 STO T T038 GTO T070 T039 EQN ENTER S1 T040 STO R T041 EQN ENTER A3 T042 STO W T043 EQN ENTER S2 T044 STO S T045 GTO T080 T046 EQN ENTER A2 T047 STO V T048 EQN ENTER S1 T049 STO R T050 EQN ENTER A3 T051 STO W T052 GTO T084 T053 EQN ENTER S1 T054 STO R T055 EQN ENTER A3 T056 STO W T057 EQN ENTER A1 T058 STO U T059 GTO T092 T060 SF 1 T061 GTO T063 T062 CF 1 T063 EQN ENTER S1 T064 STO R T065 EQN ENTER S2 T066 STO S T067 EQN ENTER A1 T068 STO U T069 GTO T096 T070 CF 10 T071 EQN (R+S+T)/2 T072 STO Q T073 EQN 2*ACOS((Q*(Q-R)/(S*T))^0.5) T074 STO U T075 EQN 2*ACOS((Q*(Q-S)/(R*T))^0.5) T076 STO V T077 EQN ACOS(-COS(U+V)) T078 STO W T079 GTO T106 T080 CF 10 T081 EQN (R*R+S*S-2*R*S*COS(W))^0.5 T082 STO T T083 GTO T070 T084 CF 10 T085 EQN ACOS(-COS(V+W)) T086 STO U T087 EQN R*(SIN(V)/SIN(U)) T088 STO S T089 EQN R*COS(V)+S*COS(U) T090 STO T T091 GTO T106 T092 CF 10 T093 EQN ACOS(-COS(U+W)) T094 STO V T095 GTO T084 T096 CF 10 T097 EQN ASIN(S/R*SIN(U)) T098 STO V T099 EQN ACOS(-COS(U+V)) T100 STO W T101 FS? 1 T102 GTO T084 T103 EQN ACOS(1)-W T104 STO W T105 GTO T084 T106 EQN R*S*SIN(W)/2 T107 STO Q T108 CF 1 T109 CF 10 T110 RTNVariables used: area Q S1 R S2 S S3 T A1 U A2 V A3 W
The program solves for 5 different triangle problems, where the SSA problem has two solutions:
1SSS 2SAS 3ASA 4SAA 5SSA 6SSA
The program solves for any plane triangle's angles, sides and area, when given the above three inputs. After a prompt for an input (e.g. ENTER S1) you enter the numeric value and press the [R/S] key to continue. Angles can be in deg, rad or grad, depending on your MODE. I modelled the interface after a program of Stefan Vorkoetter which I liked a lot. Please note that there is another program out there which does the same thing but needs 389 lines and uses 11 variables. If so desired, you can enter the following two lines starting at T108 to enables quick viewing of the results, wihout recalling them from a register: EQN [R,S,T] EQN [U,V,W] ... (rest of lines follow)
Have fun, Caspar
Edited: 24 Aug 2008, 5:16 p.m.