- Triangles with basic
- 21 Mar 2011 04:36:03 pm
- Last edited by joshie75 on 21 Mar 2011 04:47:52 pm; edited 1 time in total
So I have been at work with a bunch of programs to do physic's, calculus, and electrical engineering problems for me, and I had a good start, as I made programs for chapters 1-7 so far in calculus 8th edition book... stuff for physics such as Culoumbs (how the hell ya spell that again? ) law, electrical field strength, friction problems, and i could go on and on with the stuff I've made recently.. I am now working on a triangle solver program.. I know there are plenty of these out there already, but I like making programs, and I thought I would give it a try.
Here's what I have so far:
Code:
That is all I have so far... What I need your guys' help with, Is figuring out (not necessarily the calculations, because I know how to do the sin,cos, tan, and all their inverses to find the sides/angles) but I need help with knowing how to get to the calculations. It's hard to explain, but I know hat I mean in my head lol
I guess what I mean is, you would have to do different equations depending on what sides/angles are put in. The only way I can think of setting that up which is completelllllyyy unpractical would be doing an If/then statement for all possibilities...
ie; ABC, ABD,ABE,ABF,ACD,ACE, ACF,ADE,ADF and so on... (A,B,C are sides and D,E,F are angles)
What do I do?
Here's what I have so far:
Code:
:0->A
:0->B
:0->C
:0->D
:0->E
:0->F
:0->G
:ClrHome
:ClrDraw
:AxesOff
:Line(-6,-6,6,-6
:Line(6,-6,6,6
:Line(-6,-6,6,6
:Text(3,3,"IINPUT ANY THREE
:Text(11,3,"THEN PRS ENTER
:Text(52,45,"1
:Text(28,77,"2
:Text(25,40,"3
:Text(42,70,"4
:Text(42,33,"5
:Text(17,70,"6
:Lbl 1
:Repeat K=/0
:Getkey->k
:End
:If K=21
:Then goto 2
:End
:If K=92
:Then
:Input "SIDE",A
:Text(52,45,A
:Goto 1
:End
:If K=93
:Then
:Input "SIDE",B
:Text(28,77,B
:Goto 1
:End
:If K=94
:Then
:Input "SIDE",C
:Text(25,40,C
:Goto 1
:End
:If K=82
:Then
:Input "ANGLE",D
:Text(42,70,D
:Goto 1
:End
:If K=83
:Then
:Input "ANGLE",E
:Text(42,33,E
:Goto 1
:End
:If K=84
:Then
:Input "ANGLE",F
:Text(17,70,F
:Goto 1
:End
:Lbl 2
:
That is all I have so far... What I need your guys' help with, Is figuring out (not necessarily the calculations, because I know how to do the sin,cos, tan, and all their inverses to find the sides/angles) but I need help with knowing how to get to the calculations. It's hard to explain, but I know hat I mean in my head lol
I guess what I mean is, you would have to do different equations depending on what sides/angles are put in. The only way I can think of setting that up which is completelllllyyy unpractical would be doing an If/then statement for all possibilities...
ie; ABC, ABD,ABE,ABF,ACD,ACE, ACF,ADE,ADF and so on... (A,B,C are sides and D,E,F are angles)
What do I do?