Re: TIB: Need help with math prog I am writing


[Prev][Next][Index][Thread]

Re: TIB: Need help with math prog I am writing



This is what I have so far

12JKL:12MNO:12XYZ
Lbl X
Menu(1,"Comp",B,2,"Point",C,3,"Motion",D,10,"Docs",F,4,"Equat",E
Lbl B
ClLCD
1MNO
Goto A
Lbl Y
0MNO
Outpt(4,1,"Components:"
Outpt(4,13,D
Goto X
Disp "Enter as [x,y]"
Input "First vector:",A
Input "Second vector:",B
(dot(A,B))/((abs A)*(abs B))C
Disp CĐDMS
motion
Lbl D
Lbl A
ClLCD
Input "Initial Pos:",A
Input "New Position:",B
If MNO==1 or XYZ==1
Goto Z
Input "Elapsed Time: ",T
Lbl Z
B-AD
If MNO==1
Goto Y
If XYZ==1
Goto W
Outpt(5,1,"Displacement:"
Outpt(5,14,D
D/TV
abs VABV
Outpt(6,1,"Speed:")
Outpt(6,8,ABV
Outpt(7,2,ABV”
Outpt(7,1,"ˆ"
Pause
Goto X
Lbl E
1XYZ
Goto A
Lbl W
0XYZ
Outpt(4,1,"DirectionVector:"
Outpt(4,17,D
Outpt(5,1,"Vector Equation:"
Outpt(6,1,"(x,y)=")
Outpt(6,7,A
Outpt(6,14,"+t"
Outpt(6,16,D
Pause
ClLCD
real AK
imag AJ
real DI
imag DH
Outpt(1,1,"Parametric Equations:"
Outpt(2,1,"x="
Outpt(2,3,K
If sign I==1
Outpt(2,6,"+"
If sign I==-1
Outpt(2,6,"-"
abs IAsin
Outpt(2,7,Asin
Outpt(2,10,"t"
Outpt(3,1,"y="
Outpt(3,3,J
If sign H==1
Outpt(3,6,"+"
If sign H==-1
Outpt(3,6,"-"
abs HABSI
Outpt(3,7,ABSI
Outpt(3,10,"t"
Outpt(4,1,"Rectangler Equation:"
J-HY1
K-IX1
Y1/X1X
Solver(H=I*X+x,x,0
Outpt(5,1,"y="
Fix 3
Outpt(5,3,X
Outpt(5,9,"x"
If sign K==1
Outpt(5,10,"+"
If sign K==-1
Outpt(5,10,"-"
abs KABSK
Outpt(5,11,ABSK
Float




Goto X


>if I am understanding you right, you mean turn the points (x1,y1) and
>(x2,y2) into the line y=mx+k.
>
>here is how you do it.
>m = (y2-y1)/(x2-x1)
>
>then plug m into the equation
>
>y=x*(y2-y1)/(x2-x1)+k
>
>plug in a coordinate ( (x1,y1) used here)
>
>y1=x1*(y2-y1)/(x2-x1)+k
>
>and solve for k
>
>k=y1-x1*(y2-y1)/(x2-x1)
>
>
>If this isn't what you need, just say so.
>
>
>
>---Rosyna <rosyna@wcoil.com> wrote:
>> I am writing a Ti-Basic program for the 86 and need some help. This
>prog
>> does vectors, and at the beginning it askes for two Points the it
>does a
>> whole buch of stuff and tries to make it a rectangular equation
>(y=mx+k)
>> but I cant for the life of me figure out how to do so. PLEASE HELP!!!!
>
>
>==
>Garth Johnson
>
>gbjohnson@bigfoot.com -normal email
> brandtly@hotmail.com -Large files
>
>Visit my website!
>http://www.bigfoot.com/~garthjohnson
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
---
I pledge allegiance to the Mac of Apple Computer Incorporated, and to the
developers for which it stands, one platform, under Guy, indestructible,
with creativity and multimedia for all. 

References: