Re: TIB:physics program
[Prev][Next][Index][Thread]
Re: TIB:physics program
Okay, like always...
"_" represents one(1) space. ie. JODY_SNIDER
@ stands for 'theta'
To avoid confusion I'm just going to type in <inverse> to represent
the little negative-one-inverse-button. This way there isn't any
confusion between O<inverse> and O-1
<>, <=,>=.... means "not equal to", "less than or equal to", and
"greater than or equal to" respectively.
/L/ is the tiny capitol L used to show the name of a list. It can be
found under the list menus
Much of this program is a little demo/explaination sequence. It's neat
to look at once, or until you understand what the program is doing,
but after that it can be removed to save memory. This requires
deleting some of the program is you want to remove it. It's not hard,
though, everything with the demo is in one place and I'll clearly mark
what you'll need to delete if you are tight for memory, or whatever.
The tiny little "o"s in some of the displays are actually points.
There are the square points, and can be found under catalog somewhere
near the bottom (on the 83, not sure if they're on the 82 - you might
have to just use a capitol O)
:ClrHome:Float
:Disp "1_ _ _1_ _ _ _1_ _ _","-_=_--_+_--","F_ _ _do_ _ _di","_","di_
_ _Hi","--_=_--","do_ _ _Ho
:Pause:ClrHome
:Input "Fo=?_",X
:Input "Fe=?_",Y
(Note: in the next line "MT.. is actually a capitol M, followed by the
tiny capitol T used to denote matrix transposition.)
:Input "MT=?_",M
:Input "Ho=?_",H
:-abs(M)->M
:Disp "ACCURATE_TO_WITH","IN-----cmax("
:Output(6,10,"_ _ _
:Input "?=",D
:ClrHome
:Lbl 7
:Menu("_ _ _MICROSCOPE_ _
_","INPUT_doo,doe",A,"FINAL_ANSWER",B,"RAY_DIAGRAM",C
(Note: if you are erasing the ray diagram, do not include the
"ray-diagram part in the menu above. Instead it should look like;
:Menu("_ _ _MICROSCOPE_ _ _","INPUT_doo,doe",A,"FINAL_ANSWER",B
:Lbl B
:1->@:2->V:Y->E
:Disp
"*****_NOTE_*****","WILL_CALCULATE","doo_WHILE_MOVING","doe_AT_SMALL_I
N-","TERVALS_UNTIL","die=doo+dio+doe",-M
:Output(7,1,"AND_MT=
:Pause:ClrHome
:Disp "_","_","_","THIS_MAY_TAKE","SOME_TIME
:Goto 1
:Lbl A
:1->V:ClrHome
:Input "doo=?_",O
:Input "doe=?_",E
:Goto 2
:Lbl 1
:E-@->E
:((XYE)/((E-Y)ME))+X->O
:abs(O+(X<inverse> - O<inverse>)<inverse> +E)->S
:abs(Y<inverse> - E<inverse>)<inverse> ->I
:If abs(S-I)<=D
:Goto 2
:If I<S
:Then
:E+@->E
:@/10->@
:End
:Goto 1
:Lbl 2
:abs(O+(X<inverse> - O<inverse>)<inverse> +E)->S
:abs(Y<inverse> - E<inverse>)<inverse> ->I
:abs(X<inverse> - O<inverse>)<inverse> ->A
:abs(AH/O)->B
:abs(A/O)->C
:abs(((X<inverse> - O<inverse>)<inverse> /(O))((Y<inverse> -
E<inverse>)<inverse> /(E))H)->J
:abs(abs((I/E)->N
:ClrHome
:Disp "doo=",O,"dio=",A,"Hio=",B
:Pause:ClrHome
:Disp "Mo=",C,"doe=",E,"die=",I
:Pause:ClrHome
:Disp "doo_+_dio_+_doe=",S,"Hie=",J,"Me=",N
:Pause:ClrHome
:If V=1
:Disp "MT=",J
:If V=2
:Disp "MT=",abs(M)
:Pause
:Goto 7
If you are erasing the ray diagram, you do not need ANYTHING beyond
this point.
:Lbl C
:{X,Y,M->L1
:{19,52,52,65,94,94,102,102,0->/L/LNEND
:{0,(12/-33),(13/-48),0,.5,(8/13),(-38/63),(-10/21),0->/L/SLOPE
:{4,19,4,52,65,52,52,39,0->/L/LNBEG
:{44,44,44,32,32,32,32,32,0->/L/HTBEG
:ClrDraw:AxesOff:FnOff:0->Xmin:0->Ymin
:1->/delta X/:1->/delta Y/
:0->V:0->P
:Lbl 4
:V+1->V
:ClrDraw
:Horizontal 40
:Vertical 19
:Vertical 65
:Text(0,4,"OBJECTIVE
:Text(0,53,"EYEPIECE
:Line(2,40,2,44
:Pt-On(1,43
:Pt-On(3,43
:Line(8,39,8,41
:Line(30,39,30,41
:Line(49,39,49,41
:Line(81,39,81,41
:If V=3
:Then
:Line(52,31,52,40
:Line(52,31,55,34
:Line(52,31,49,34
:End
:If V=1
:Then
:Line(19,10,19,0,0
:Line(2,2,2,40
:Line(2,2,6,6
:Line(2,2,0,4
:Line(52,32,52,40
:Line(52,32,55,35
:Line(52,32,49,35
:Line(2,50,17,50
:Line(21,50,50,50
:Line(54,50,63,50
:Line(52,50,52,50
:Line(4,2,63,2
:Line(4,44,6,44
:Line(6,44,6,4
:Line(6,43,9,43
:Text(6,4,"doo
:Text(6,30,"dio
:Text(6,53,"doe
:Text(54,28,"die
:Text(16,10,"Ho
:Text(23,10,"Fo
:Text(24,28,"Fo
:Text(15,45,"Fe
:Text(15,78,"Fe
:Text(38,7,"Hie
:Text(23,53,"Hio
:Pause
:Goto 4
:Else
:Lbl 6
:While P<dim(/L/LNEND
:P+1->P
:If P<>1
:Then
:-1->F
:While F<18 and P<>2 and P<>5
:F+1->F
:Line(40+F,18,40+F,0,0
:Line(58+F,18,58+F,0,0
:Line(76+F,18,76+F,0,0
:End
:End
:If P=1
:Then
:Line(65,0,65,20,0
:Text(11,8,"A
:Text(44,40,"LIGHT_RAY_A_IS
:Text(50,40,"REFRACTED_THRO
:Line(92,9,94,9
:Text(56,40,"UGH_Fo
:End
:If P=3
:Then
:Text(24,13,"B
:Text(44,40,"RAY_B_GOES_THROU
:Pt-On(94,15
:Text(50,40,"GH_CNTR_OF_LENS,
:Text(56,40,"NOT_REFRACTED
:End
:If P=4 and J<>25
:Then
:Line(50,31,55,31,0
:Text(44,40,"IMAGE_IS_FORMED
:Text(50,40,"WHERE_RAYS_INTE
:Line(93,9,94,9
:Text(56,40,"RSECT
:Line(52,32,52,40
:Line(52,32,55,35
:Line(52,32,49,35
:Line(52,32,49,35
:0->K
:While K<100
:K+1->K
:End
:P-1->P
:25->J
:Goto 6
:End
:If P=4 and J=25
:Then
:1->J
:Text(28,74,"C
:Text(44,40,"RAY_C_IS_REFRACT
:Pt-On(94,15
:Text(50,40,"ED_THROUGH_Fe
:End
:If P=6
:Then
:Text(11,67,"D
:Text(44,40,"RAY_D_GOES_THOU
:Pt-On(94,15
:Text(50,40,"GH_CNTR_OF_LENS,
:Text(56,40,"NO_REFRACTION
:End
:If P=7
:Then
:Text(44,40,"RAYS_C_AND_D_DIV
:Line(93,15,94,15
:Text(50,40,"ERGE_SO........
:End
:If P=8
:Then
:Text(44,40,"YOUR_BRAIN_PERC
:Line(93,15,94,15
:Text(50,40,"EIVES_A_VIRTUAL
:Text(56,40,"IMAGE_IN_THE.....
:End
:/L/LNBEG(P)->X
:/L/HTBEG(P)->Y
:While X</L/LNEND(P)
:X+1->X
:If P=7 or P=8
:104-X->X
:Y+/L/SLOPE(P)->Y
:Pt-On(X,Y
:If P=7 or P=8
:104-X->X
:End
:End
:Text(44,40,"SAME_PLACE_AS
:Text(50,40,"THE_ORIGINAL
:Text(56,40,"OBJECT
:Line(2,2,2,40
:Line(2,2,6,6
:Line(2,2,-2,6
:Pause
:L1(1)->X:L1(2)->Y:L1(3)->M
:Goto 7
Jody Snider
jody1@alaska.net
References: