DECLARE SUB seesquad () DECLARE SUB seefront () DECLARE SUB introsonar () DECLARE SUB menu () DECLARE SUB introtrn () DECLARE SUB relatrn1 () DECLARE SUB relatrn2 () DECLARE SUB gedanken () DECLARE SUB kijken () COMMON SHARED men$ 'define train data for menu 6 '******************************* 'data per coach '************** TYPE coach dist AS SINGLE 'distance from observer dy ordn AS INTEGER 'ordinate dh absc AS INTEGER 'abscis xt hght AS INTEGER 'height ht ordnold AS INTEGER 'old values dho abscold AS INTEGER ' xto hghtold AS INTEGER ' hto END TYPE 'data per train '************** TYPE train le AS SINGLE 'observed length of coaches xv AS INTEGER 'limit points viewing dy AS SINGLE 'distance of nearest coach kv AS INTEGER 'velocity array index bet AS SINGLE 'velocity dv AS SINGLE 'distance increment (as fraction of velocity) col AS INTEGER 'color parm for Doppler simulation lorein AS INTEGER 'switch for Lorentz/Einstein/inv. Lorentz trains END TYPE 'end train data '***************************** 'main menu '********* menu: CALL menu IF men$ = "1" THEN introsonar IF men$ = "2" THEN introtrn IF men$ = "3" THEN gedanken IF men$ = "4" THEN kijken IF men$ = "5" THEN relatrn1 IF men$ = "6" THEN relatrn2 IF men$ = "7" THEN seefront IF men$ = "8" THEN seesquad IF men$ = "0" OR men$ = "" THEN PLAY "l21o3gp21fp21ep21d" LOCATE 27 INPUT " -> Quit RELASEE (ENTER=yes) ? ", y$ IF y$ = "" THEN PLAY "l21o3cp21cp21dp21ep21l10d.l21cl5cp5" END END IF END IF GOTO menu END SUB gedanken pi = ATN(1) * 4 SCREEN 12 xl = 110: xr = 639 - xl 'screen limits WINDOW (-xl, -240)-(xr, 239) CLS GOSUB controlsquad initiate: ly = 50: lx = 50: x0 = 0: x = 0: xo = x 'squad and pawn parms xfore = x: xback = x: 'fore and back return points y = 0: yo = y c = 50 'light speed colemit = 4: colrecv = 9 'emission/reception signal col. GOSUB keus 'choose settings GOSUB teken 'draw squad IF cone$ = "3" THEN 'display mode 3 LOCATE 3: COLOR 14 PRINT " 1: all rays leave emission point " PRINT COLOR 7: PRINT " light (or sonar)"; COLOR colrecv PRINT " reception cone/"; COLOR colemit: PRINT "emission cone " CIRCLE (x0, 0), 2, 14 LOCATE 25: COLOR 3 PRINT " In case of light clocks (not for sonar) ->" PRINT " events 2,3,4 (return ellips) simultaneous for moving grid!" PRINT " (halving the time interval between 5, recept, and 1, emit)" SLEEP 3 LOCATE 3: COLOR 0 PRINT " all rays leave emission point " CIRCLE (x0, 0), 2, 0 COLOR 15 ELSE SLEEP 1 END IF 'cyclus: '******* 'first milestone=back signal returns: '************************************ cyclus1: FOR ct = 0 TO ctxback STEP ctreturn / n GOSUB xincrem 'increase x xfore = x0 + ct 'fore signal xback = x0 - ct 'back signal y = ct * SQR(1 - bet * bet) 'traverse signals GOSUB teken: IF cone$ = "3" THEN GOSUB cyclone1 GOSUB scankey NEXT ct IF cone$ = "3" THEN 'conclude cycle mode 3 ct = ctxback GOSUB xincrem xfore = x0 + ct xback = x0 - ct y = ct * SQR(1 - bet * bet) GOSUB teken GOSUB cyclone1 CIRCLE (x0 - ctxback, 0), 2, 12 LOCATE 3: COLOR 15 PRINT " 2: back ray reaches return point " SLEEP 3 LOCATE 3: COLOR 0 PRINT " back ray reaches return point " COLOR 15 END IF 'second milestone=transverse signals return: '******************************************* cyclus2: FOR ct = ctxback TO ctreturn / 2 STEP ctreturn / n GOSUB xincrem xfore = x0 + ct xback = x0 - 2 * ctxback + ct y = ct * SQR(1 - bet * bet) GOSUB teken IF cone$ = "3" THEN GOSUB cyclone2 GOSUB scankey NEXT ct IF cone$ = "3" THEN ct = ctreturn / 2 GOSUB xincrem xfore = x0 + ct xback = x0 - 2 * ctxback + ct y = ct * SQR(1 - bet * bet) GOSUB teken CIRCLE (x0 + bet * ctreturn / 2, ly), 2, 12 CIRCLE (x0 + bet * ctreturn / 2, -ly), 2, 12 CIRCLE (x0 - ctxback, 0), 2, 12 GOSUB cyclone2 r = .5 * (ctxback + ctxfore) CIRCLE (x0 + bet * ctreturn / 2, 0), r, colemit, .5 * pi, 1.5 * pi, ly / r LOCATE 3: COLOR 15 PRINT " 3: transversal rays reach return point " SLEEP 3 LOCATE 3: COLOR 0 PRINT " transversal rays reach return point " COLOR 15 END IF 'third milestone=fore signal returns: '************************************ cyclus3: FOR ct = ctreturn / 2 TO ctxfore STEP ctreturn / n GOSUB xincrem xfore = x0 + ct xback = x0 - 2 * ctxback + ct y = 2 * ly - ct * SQR(1 - bet * bet) GOSUB teken IF cone$ = "3" THEN GOSUB cyclone3 GOSUB scankey NEXT ct IF cone$ = "3" THEN ct = ctxfore GOSUB xincrem xfore = x0 + ct xback = x0 - 2 * ctxback + ct y = 2 * ly - ct * SQR(1 - bet * bet) GOSUB teken CIRCLE (x0 + ctxfore, 0), 2, 12 CIRCLE (x0 + bet * ctreturn / 2, ly), 2, 12 CIRCLE (x0 + bet * ctreturn / 2, -ly), 2, 12 CIRCLE (x0 - ctxback, 0), 2, 12 GOSUB cyclone3 r = .5 * (ctxback + ctxfore) CIRCLE (x0 + bet * ctreturn / 2, 0), r, colemit, , , ly / r LOCATE 3: COLOR 15 PRINT " 4: up ray reaches return point " SLEEP 3 LOCATE 3: COLOR 0 PRINT " up ray reaches return point " COLOR 15 CIRCLE (-2 + x0 + bet * ctreturn / 2, 0), r, colrecv, , , ly / r END IF 'last milestone=all signals converge again: '****************************************** cyclus4: FOR ct = ctxfore TO ctreturn STEP ctreturn / n GOSUB xincrem xfore = x0 + 2 * ctxfore - ct xback = x0 - 2 * ctxback + ct y = 2 * ly - ct * SQR(1 - bet * bet) GOSUB teken IF cone$ = "3" THEN GOSUB cyclone4 GOSUB scankey NEXT ct IF cone$ = "3" THEN ct = ctreturn GOSUB xincrem xfore = x0 + 2 * ctxfore - ct xback = x0 - 2 * ctxback + ct y = 2 * ly - ct * SQR(1 - bet * bet) GOSUB teken GOSUB cyclone4 CIRCLE (x0 + bet * ctreturn / 2, 0), r, colemit, , , ly / r CIRCLE (-2 + x0 + bet * ctreturn / 2, 0), r, colrecv, , , ly / r CIRCLE (x0 + bet * ctreturn, 0), 2, 14 LOCATE 3: COLOR 14 PRINT " 5/1: all rays reach reception/leave emission point " SLEEP 3 LOCATE 3: COLOR 0 PRINT " all rays reach reception point " COLOR 15 CIRCLE (x0 + bet * ctreturn, 0), 2, 0 END IF x0 = x GOTO cyclus1 'next cycle of milestones EXIT SUB 'Subroutines '************ 'draw squad '*********** teken: FOR i = -2 TO 2 FOR j = -2 TO 2 PSET (xo + i * lx, j * ly), 0 NEXT j NEXT i CIRCLE (xo, 0), 1, 0 CIRCLE (xo + lx, 0), 1, 0: CIRCLE (xo - lx, 0), 1, 0 CIRCLE (xo, ly), 1, 0: CIRCLE (xo, -ly), 1, 0 IF cone$ = "1" THEN 'mode 1 = update signals simply LINE (xbacko, 0)-(xforeo, 0), 0 LINE (xo, -yo)-(xo, yo), 0 END IF IF cone$ = "2" THEN col = 8 ELSE col = 0 'mode 2 = trail signals PSET (xo, yo), col: PSET (xo, -yo), col PSET (xforeo, 0), col: PSET (xbacko, 0), col FOR i = -2 TO 2 FOR j = -2 TO 2 PSET (x + i * lx, j * ly), 3 NEXT j NEXT i CIRCLE (x, 0), 1, 11 CIRCLE (x + lx, 0), 1, 11: CIRCLE (x - lx, 0), 1, 11 CIRCLE (x, ly), 1, 11: CIRCLE (x, -ly), 1, 11 IF cone$ = "1" THEN SELECT CASE ct CASE IS <= ctxback colb = colemit: colt = colemit: colf = colemit CASE IS < ctreturn / 2 colb = colrecv: colt = colemit: colf = colemit CASE IS < ctxfore colb = colrecv: colt = colrecv: colf = colemit CASE ELSE colb = colrecv: colt = colrecv: colf = colrecv END SELECT LINE (xback, 0)-(x, 0), colb: LINE -(xfore, 0), colf LINE (x, y)-(x, -y), colt CIRCLE (x, 0), 1, 11 END IF PSET (x, y), 14: PSET (x, -y), 14 PSET (xfore, 0), 14: PSET (xback, 0), 14 t = TIMER: WHILE TIMER - t < .02: WEND RETURN 'Choose settings: '**************** keus: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " GEDANKENexperiment with signal pulses, interactive" PRINT : PRINT : COLOR 7 PRINT " >>> Choose settings:" PRINT : PRINT : COLOR 3 PLAY "l24o4d" PRINT " Beta velocity factor (0 to .98, 1=END, ELSE=.5) : "; COLOR 11: INPUT "", bet IF bet = 1 THEN EXIT SUB IF ABS(bet) < 0 OR ABS(bet) > .98 THEN bet = .5 lx = lx * SQR(1 - bet * bet) ctreturn = 2 * ly / SQR(1 - bet * bet) ctxfore = ly * SQR((1 + bet) / (1 - bet)) ctxback = ly * SQR((1 - bet) / (1 + bet)) PRINT : COLOR 3 PRINT " Simulation speed (5=quick to 50=slow, ELSE=10) : "; COLOR 11: INPUT "", n IF n < 5 OR n > 50 THEN n = 10 n = (ctreturn * n / c) '''steps in global path ctreturn PRINT : COLOR 2 PRINT " >>> Display mode for light/sonar pulses:" PRINT : COLOR 7 PRINT " 0 = show only current positions (ENTER=Default)" PRINT " 1 = Line-link current positions" PRINT " 2 = Trail positions" PRINT " 3 = Display and comment light cones: return events considered" PRINT " as simultaneous in moving squad's frame, and synchronous" PRINT " emission/reception events (3 secs pause each)" PRINT : COLOR 3 PRINT " Choose mode (0,1,2,3) : "; COLOR 11: INPUT "", cone$ CLS RETURN 'increment x: '************* xincrem: xo = x: xforeo = xfore: xbacko = xback: yo = y 'old values x = x0 + bet * ct IF x > xr THEN 'out of screen = start left x = x - x0 xo = xo - x0 xforeo = xforeo - x0: xbacko = xbacko - x0 x0 = 0 CLS END IF RETURN 'scan controls: '************** scankey: a$ = INKEY$ SELECT CASE a$ CASE " " GOSUB controlsquad CASE CHR$(13) GOTO initiate CASE CHR$(27) EXIT SUB CASE "" CASE ELSE PLAY "l24o2c": SLEEP: a$ = INKEY$: a$ = "" END SELECT RETURN 'mode 3 by-routines: '******************* cyclone1: LINE (x0, 0)-(xo, yo), colemit LINE (x0, 0)-(xo, -yo), colemit LINE (x0, -1)-(xforeo, -1), colemit LINE (x0, -1)-(xbacko, -1), colemit RETURN cyclone2: LINE (x0 - ctxback, -1)-(x0, -1), colemit LINE (x0, 0)-(xo, yo), colemit LINE (x0, 0)-(xo, -yo), colemit LINE (x0, -1)-(xforeo, -1), colemit LINE (x0 - ctxback, 1)-(xbacko, 1), colrecv RETURN cyclone3: LINE (x0 - ctxback, -1)-(x0, -1), colemit LINE (x0, 0)-(x0 + bet * ctreturn / 2, ly), colemit LINE (x0, 0)-(x0 + bet * ctreturn / 2, -ly), colemit LINE (x0 + bet * ctreturn / 2, ly)-(xo, yo), colrecv LINE (x0 + bet * ctreturn / 2, -ly)-(xo, -yo), colrecv LINE (x0, -1)-(xforeo, -1), colemit LINE (x0 - ctxback, 1)-(xbacko, 1), colrecv RETURN cyclone4: LINE (x0 - ctxback, -1)-(x0, -1), colemit LINE (x0, 0)-(x0 + bet * ctreturn / 2, ly), colemit LINE (x0, 0)-(x0 + bet * ctreturn / 2, -ly), colemit LINE (x0 + bet * ctreturn / 2, ly)-(xo, yo), colrecv LINE (x0 + bet * ctreturn / 2, -ly)-(xo, -yo), colrecv LINE (x0 + ctxfore, 1)-(xforeo, 1), colrecv LINE (x0 - ctxback, 1)-(xbacko, 1), colrecv RETURN 'Display controls: '***************** controlsquad: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " GEDANKENexperiment with signal pulses, interactive " COLOR 15: PRINT : PRINT PRINT " DISPLAY:" COLOR 3: PRINT " ..."; COLOR 11: PRINT "... "; COLOR 3: PRINT "squad pawns and "; COLOR 11: PRINT "typical pawns" COLOR 7: PRINT " ....."; COLOR 14: PRINT ". current and "; COLOR 7: PRINT "traced impulse positions" COLOR 9: PRINT " ..."; COLOR 12: PRINT "... emission and "; COLOR 9: PRINT "reception "; COLOR 7: PRINT "light cones or line-linked pulses" PRINT : COLOR 15 PRINT " SETTINGS:" COLOR 7 PRINT " The settings define velocity (*), play speed, and monitoring the" PRINT " light pulses (plain display; line-link synchronic pulses; " PRINT " trace pulses; or display/comment key events: emission, return points, " PRINT " reception)." PRINT " (*) as a fraction of impulse velocity, the maximum velocity at which" PRINT " the (light or sonar) pulse squad may operate respectively!" PRINT : COLOR 15 PRINT " CONTROLS:" COLOR 2 PRINT " ENTER = New settings" PRINT " SPACE = Show this Intro and continue" PRINT " ESCAPE = END" PRINT " Other = PAUSE" PLAY "l21o3gp21fp21ep21d" GOSUB waitsquad CLS RETURN 'pause after screens '******************* waitsquad: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 25 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN END SUB SUB introsonar 'Recapitulation GEDANKENexperiment with signal pulses interchanging squad '************************************************************************ CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " GEDANKENexperiment with signal pulses, recapitulation 1/4" PRINT : COLOR 7 PRINT " In the 'RELATY' program the fundamentals of special relativity are" PRINT " explained and developed in a space-time description (Minkowsky" PRINT " diagrams). The present GEDANKENexperiment is also described there," PRINT " as it illustrates the phenomena of length contraction and time dilatation." PRINT PRINT " This program deals with the question how objects are actually being" PRINT " 'observed' by each other. More often than not, there is confusion" PRINT " between the notions of measurement, and of actually seeing things." PRINT " The formulas of Special Relativity describe measurement results. " PRINT " How things are seen, depends in addition upon the different light" PRINT " paths through the object and the time needed for that light to" PRINT " reach the observer." PRINT PRINT " Although rather belonging to the measurement description of S.R.," PRINT " the GEDANKENexperiment is recapitulated here, and also simulated" PRINT " under 3, as it answers in its own basic way the questions: " PRINT " How does matter perceive itself? Why does S.R. apply the way it does?" PLAY "l21o3gp21fp21ep21d" GOSUB waitsonar CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " GEDANKENexperiment with signal pulses, recapitulation 2/4" PRINT : COLOR 7 PRINT " It all comes from the realisation that all matter sees the SAME light" PRINT " being transmitted through space and time, but this happens in a" PRINT " 'linear enough' way that all matter may use it to define light clocks" PRINT " as gauging tools for its own distance and time units." PRINT PRINT " So, any internal structure of matter must use light signals to" PRINT " exchange messages of the kind 'Here I am, there you stay'. The " PRINT " GEDANKENexperiment describes exactly such a basic structure in the" PRINT " form of a grid of pawns exchanging synchronous signal pulses." PRINT PRINT " Now, if the pulses would consist of sound waves (sonar), the pawns" PRINT " of course could still 'see each other' as you can, and watch the sound" PRINT " pulses at work in a medium (air) as you do the pixels on your screen." PRINT " So they would see the squadron being distorted, featuring a visible" PRINT " distance contraction and response time dilatation." PRINT PLAY "l24o4d" GOSUB waitsonar CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " GEDANKENexperiment with signal pulses, recapitulation 3/4" PRINT : COLOR 7 PRINT " But if it would be electromagnetic impulses (light clocks instead of" PRINT " sonar) they have no 'external' observation medium left. " PRINT PRINT " So the light clocks' synchronisation is really an elementary tool for" PRINT " 1) defining simultaneity (return points are simultaneous for the " PRINT " 'moving' squad concerned, but not for an observer 'at rest')," PRINT " 2) gauging material lengths (lengths 'transverse' to motion are" PRINT " preserved)." PRINT " Thus yielding both," PRINT " 3) time dilatation (transverse light paths are elongated), and" PRINT " 4) length contraction along line of motion (transverse and longitudinal" PRINT " light clocks to remain synchronous: time isotropy!)." PRINT PRINT " It proves that these features are reversible, in that either of two" PRINT " moving squadrons accordingly obtains a proper frame of" PRINT " 'observation' or reference. And either observes the other with" PRINT " mutually equal distortions." PLAY "l24o4d" GOSUB waitsonar CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " GEDANKENexperiment with signal pulses, recapitulation 4/4" PRINT : COLOR 7 PRINT " So there is no objective way of distinguishing one's own, or each " PRINT " others', motion with respect to the motion of light. There is no" PRINT " objective motion (and light speed is the same for everybody)." PRINT PRINT " The simulation under (3) displays "; COLOR 3: PRINT "a typical portion of the squad" PRINT " as a grid of pawns"; COLOR 7: PRINT ", and within it "; COLOR 11: PRINT "a typical pawn and his direct " PRINT " neighbours "; COLOR 7: PRINT "with whom he communicates by "; COLOR 14: PRINT "synchronised pulses. " PRINT : COLOR 7 PRINT " This is the way every pawn checks, and maintains, his 'equidistant'" PRINT " position in the squad. (The simulation under (8) deals with" PRINT " actually seeing the squad)." PRINT PRINT " In terms of the structure of matter:" PRINT " this is the way matter gauges and keeps itself together!" PLAY "l24o4d" GOSUB waitsonar CLS EXIT SUB 'pause after screens '******************* waitsonar: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 24 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN END SUB SUB introtrn 'introduction to distinguishing Lorentz transformation and Seeing objects '************************************************************************ CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " Seeing moving objects 1/5" PRINT : COLOR 7 PRINT " If the notion of simultaneity being different for moving observers" PRINT " seems a bit confusing at first, it may be a relief realising that" PRINT " these 'simultaneous worlds', apart from being different for " PRINT " each observer, are actually never really 'seen' at all." PRINT PRINT " What a light ray reaching an observer reports, is a set of events" PRINT " that is the same whatever the state of the observer's motion." PRINT " Moreover, those events belong to different epochs, farther" PRINT " back in time the greater their distance. The only thing, according to" PRINT " S.R., different observers wouldn't agree as how to arrange the " PRINT " 'simultaneous slices', or space axes, to which those events belong." PRINT PRINT " The Lorentz transformation in S.R. describes the 'slicing' procedure" PRINT " for each observer. For a moving object it determines the part of" PRINT " the object fitting in 'simultaneous slices' for that observer." PRINT " I'll call that the Lorentz object." PLAY "l21o3gp21fp21ep21d" GOSUB waiting CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " Seeing moving objects 2/5" PRINT : COLOR 7 PRINT " As I have stated, that is not the object you're going to see!" PRINT " Seeing it depends upon the paths light has to traverse from throughout" PRINT " the (Lorentz) object. The result is a deformed view containing parts" PRINT " of the object with different histories, which the observer could deduce" PRINT " by (Lorentz) measurement. I call that the Einstein object. For one" PRINT " thing, the Doppler effect is a feature of the Einstein object. " PRINT PRINT " The first case examined in this program is uniform 1D motion," PRINT " i.e. a 1D object moving along its axis with constant speed." PRINT " Whether it's approaching or regressing, light rays sent to the observer" PRINT " carry information from the farther side, at an earlier stage than from" PRINT " the closer side. This results in the following formulas for the" PRINT " Einstein object:" PLAY "o4l24c" GOSUB waiting CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " Seeing moving objects 3/5" PRINT : COLOR 11 PRINT " Formulas:" PRINT : COLOR 7 PRINT " Given : Proper length L0; velocity v, light speed c" PRINT " beta=beta(v)=v/c" PRINT " gamma=gamma(v)=1/SQR(1-beta*beta)" PRINT PRINT " Lorentz equations : x'=gamma*(x -v*t ) t'=gamma*(t -v*x /c^2)" PRINT " inversely : x =gamma*(x'+v*t') t =gamma*(t'+v*x'/c^2)" PRINT PRINT " Lorentz and Einstein object characteristics:" PRINT PRINT " Lorentz length : L=L0/gamma" PRINT " Einstein lengths : approach=L/(1-beta) ; regression=L/(1+beta)" PRINT " Einstein velocities : approach=beta/(1-beta); regression=beta/(1+beta)" PRINT " Inverted Lor. length: L'=L0*gamma" PLAY "o4l24c" GOSUB waiting CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " Seeing moving objects 4/5" PRINT : COLOR 7 PRINT " Note that during approach, the Einstein object features not" PRINT " a length contraction, but a length dilatation, whereas during" PRINT " regression it has an extra length contraction." PRINT PRINT " When velocity tends to light speed, the approach length and speed" PRINT " tend to infinity. The whole approach is thus witnessed as one" PRINT " flash in a single moment. The regression length on the other hand" PRINT " tends to zero, and the speed to half the light speed, so the Einstein" PRINT " object appears compressed in one point (as does the Lorentz object)" PRINT " regressing at half the light speed." PRINT PRINT " The inverted Lorentz length corresponds to a 'slicing' of the moving" PRINT " object's world lines according to its own simultaneity, or space" PRINT " axis. Inversely, the object at rest, 'sliced' according to the observer" PRINT " at rest, is itself an inverted Lorentz object for the moving system," PRINT " whereas sliced according to the moving system it is a plain" PRINT " Lorentz object to it. Note that L/L0 = L0/L' = 1/gamma." PLAY "o4l24c" GOSUB waiting CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT : COLOR 11 PRINT " Seeing moving objects 5/5" PRINT : COLOR 7 PRINT " Option (4) develops uniform 1D motion within the space-time" PRINT " framework, showing the different world trajectories involved." PRINT " Options (5) and (6) implement such motion 'in real time', taking" PRINT " the case of a train coach and a whole train respectively. Option (5)" PRINT " discusses all key events, while option (6) lets you toy with" PRINT " two trains, emulates Doppler effect, and allows switching between" PRINT " Einstein, Lorentz, and inverted Lorentz trains." PRINT PRINT " Finally, two 2D cases are presented." PRINT " The first, see option (7), exposes the progression of a front line," PRINT " i.e. a 1D object that moves perpendicularly to itself." PRINT " For an observer, along the perpendicular direction to the front" PRINT " he will notice the same delays as in the 1D case. In addition," PRINT " points more distant in the front will be affected by greater delays." PRINT PRINT " The second case is our very GEDANKENsquad! This may be described" PRINT " indeed as a succession of fronts, so it is merely a combination" PRINT " of front movements: see option (8)." PLAY "o4l24c" GOSUB waiting EXIT SUB 'wait after each intro screen '**************************** waiting: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 24 PRINT "-> Push a key... (ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN END SUB SUB kijken 'Measuring ain't seeing: spacetime diagram description '****************************************************** dy = 2 'y-increment dt = .02 'timer increment GOSUB Controlwatch 'display controls... opnieuw: 'start again GOSUB setwatch 'choose settings CLS WINDOW (-1.3 * w, -w)-(1.3 * w, w) COLOR 3: PRINT "Measured ---" PRINT COLOR 14: PRINT "Seen"; COLOR 9: PRINT " ---"; COLOR 12: PRINT "---" x10 = 0: y10 = 0: x20 = 0: y20 = 0: yw0 = 0: xm0 = 0: delty = 0 'old values y = -w * .8 'y<0 = 'Left' = approach '*********************** WHILE y < 0 - dy yw = y + dy: y = yw xm = yw * beta GOSUB links: GOSUB assen t = TIMER: WHILE TIMER - t < dt: WEND WEND 'y>=0 '**** LINE (x20, y20)-(x10, y10), 0: LINE -(0, yw0), 0 PSET (x20, y20), 3: PSET (x10, y10), 3 ' 'Midway' = object passing by origin '************************************ WHILE y < leng / beta - dy yw = y + dy: y = yw xm = beta * yw IF ABS(y1) > w THEN GOTO verder GOSUB midden: GOSUB assen t = TIMER: WHILE TIMER - t < dt: WEND WEND 'y>=leng/beta = 'Right' = regression '*********************************** LINE (x20, y20)-(0, yw0), 0: LINE -(x10, y10), 0 PSET (x20, y20), 3: PSET (x10, y10), 3 vlag1% = 1 WHILE y < yend - dy yw = y + dy: y = yw xm = beta * yw IF ABS(y1) > w THEN GOTO verder GOSUB rechts: GOSUB assen t = TIMER: WHILE TIMER - t < dt: WEND WEND verder: 'proceed links = leng / (1 - beta) LINE (0, ww)-(-links, ww - 6), 9, B 'looking 'left' LINE (xm0, www + 1)-(xm0 - len0 * gam, www + 5), 2, B 'inverse Lor. obj. delty = len0 * (gam - 1 / gam) / beta LINE (xm0, yw0)-(xm0 - len0 * gam, yw0 - delty), 2 info: LOCATE 1, 1 'display info COLOR 7: PRINT " Lengths: " COLOR 15: PRINT USING "proper length ###"; len0 COLOR 3: PRINT USING "Lorentz length ###"; leng COLOR 2: PRINT USING "inv. Lorz. lth. ######"; len0 * gam COLOR 14: PRINT "Einstein lengths :" COLOR 9: PRINT USING "approach seen ######"; leng / (1 - beta) COLOR 12: PRINT USING "regression seen ###"; leng / (1 + beta) PRINT COLOR 7: PRINT " Velocities:" COLOR 3: PRINT USING "motion .##"; beta COLOR 9: PRINT USING "approach seen ###.##"; beta / (1 - beta) COLOR 12: PRINT USING "regression seen .##"; beta / (1 + beta) PRINT ' wait: '****** wacht: LOCATE 28, 1: COLOR 13: PRINT " -> SPACE" PLAY "l12o4d": SLEEP: a$ = INKEY$ IF a$ <> " " GOTO wacht LOCATE 28, 1: COLOR 11: PRINT " " GOTO opnieuw EXIT SUB 'Subroutines: '************* links: x1 = xm / (1 - beta): y1 = yw / (1 - beta) x2 = x1 - leng / (1 - beta): y2 = y1 - leng / (1 - beta) 'CLR: '**** CIRCLE (0, yw0), 2, 0 LINE (x20, y20)-(x10, y10), 0: LINE -(0, yw0), 0 LINE (x20, yw0)-(x10, yw0), 0: LINE -(0, yw0), 0 LINE (x20, ww)-(x10, ww - 6), 0, B LINE (xm0, yw0)-(xm0 - leng, yw0), 0 '''measurement LINE (xm0 - leng, www)-(xm0, www + 6), 0, B '''measured ' draw: '****** CIRCLE (0, yw), 2, 15 '''observer LINE (xm, yw)-(xm - leng, yw), 3 '''measurement LINE (x2, y2)-(x1, y1), 7: LINE -(0, yw), 8 '''light lines LINE (x2, yw)-(x1, yw), 14 '''instant see-lines LINE (x2, ww)-(x1, ww - 6), 9, B LINE (xm - leng, www)-(xm, www + 6), 3, B '''measured ' trails: '******** IF spoor% = 1 AND y20 > www THEN LINE (x20, y20)-(x10, y10), 8 IF spoor% = 2 THEN LINE (x20, yw0)-(x10, yw0), 14 IF spoor% = 3 THEN LINE (xm0, yw0)-(xm0 - leng, yw0), 3 IF spoor% = 4 THEN delty = len0 * (gam - 1 / gam) / beta LINE (xm0, yw0)-(xm0 - len0 * gam, yw0 - delty), 2 END IF PSET (x20, y20), 3: PSET (x10, y10), 3 PSET (xm0, yw0), 3: PSET (xm0 - leng, yw0), 3 PSET (x20, yw0), 9: PSET (x10, yw0), 9 x10 = x1: y10 = y1: x20 = x2: y20 = y2: yw0 = yw: xm0 = xm RETURN midden: x2 = (xm - leng) / (1 - beta): y2 = (-leng + yw) / (1 - beta) x1 = xm / (1 + beta): y1 = x1 / beta 'CLR: CIRCLE (0, yw0), 2, 0 LINE (x20, yw0)-(x10, yw0), 0 LINE (x20, y20)-(0, yw0), 0: LINE -(x10, y10), 0 LINE (x20, ww)-(0, ww - 6), 0, B '''Einstein coach... LINE (0, ww)-(x10, ww - 6), 0, B '''...passing... LINE (xm0, yw0)-(xm0 - leng, yw0), 0 '''measurement LINE (xm0 - leng, www)-(xm0, www + 6), 0, B '''measured LINE (xm0, www - 3)-(xm0, www + 3), 0 '''tekenen CIRCLE (0, yw), 2, 15 LINE (xm, yw)-(xm - leng, yw), 3 '''measurement LINE (x2, y2)-(0, yw), 15: LINE -(x1, y1), 15 LINE (x2, yw)-(x1, yw), 14 LINE (x2, ww)-(0, ww - 6), 9, B '''Einstein coach... LINE (0, ww)-(x1, ww - 6), 12, B '''...passing... LINE (0, ww)-(0, ww - 6), 0 '''...observer LINE (xm - leng, www)-(xm, www + 6), 3, B '''measured ' trails: IF spoor% = 1 THEN LINE (x20, y20)-(0, yw0), 8: LINE -(x10, y10), 8 IF spoor% = 2 THEN LINE (x20, yw0)-(x10, yw0), 14 IF spoor% = 3 THEN LINE (xm0, yw0)-(xm0 - leng, yw0), 3 IF spoor% = 4 THEN delty = len0 * (gam - 1 / gam) / beta LINE (xm0, yw0)-(xm0 - len0 * gam, yw0 - delty), 2 END IF PSET (x20, y20), 3: PSET (x10, y10), 3 PSET (xm0, yw0), 3: PSET (xm0 - leng, yw0), 3 PSET (x20, yw0), 9: PSET (x10, yw0), 12 x10 = x1: y10 = y1: x20 = x2: y20 = y2: yw0 = yw: xm0 = xm RETURN rechts: x1 = xm / (1 + beta): y1 = x1 / beta x2 = x1 - leng / (1 + beta): y2 = y1 + leng / (1 + beta) 'CLR: CIRCLE (0, yw0), 2, 0 LINE (x10, y10)-(x20, y20), 0: LINE -(0, yw0), 0 LINE (0, yw0)-(x20, yw0), 0: LINE -(x10, yw0), 0 LINE (x20, ww)-(x10, ww - 6), 0, B LINE (xm0, yw0)-(xm0 - leng, yw0), 0 '''meas. LINE (xm0 - leng, www)-(xm0, www + 6), 0, B '''meas. LINE (xm0, www - 3)-(xm0, www + 3), 0, B '''tekenen CIRCLE (0, yw), 2, 15 LINE (xm, yw)-(xm - leng, yw), 3 '''meas. LINE (x1, y1)-(x2, y2), 15: LINE -(0, yw), 7 LINE (x2, yw)-(x1, yw), 14 LINE (x2, ww)-(x1, ww - 6), 12, B LINE (xm - leng, www)-(xm, www + 6), 3, B '''meas. ' trails: IF spoor% = 1 THEN IF vlag1% = 1 THEN vlag1% = 0: LINE (x20, y20)-(0, yw0), 8: LINE -(x10, y10), 8 ELSE LINE (x10, y10)-(x20, y20), 8 END IF END IF IF spoor% = 2 THEN LINE (x20, yw0)-(x10, yw0), 14 IF spoor% = 3 THEN LINE (xm0, yw0)-(xm0 - leng, yw0), 3 IF spoor% = 4 THEN delty = len0 * (gam - 1 / gam) / beta LINE (xm0, yw0)-(xm0 - len0 * gam, yw0 - delty), 2 END IF PSET (x20, y20), 3: PSET (x10, y10), 3 PSET (xm0, yw0), 3: PSET (xm0 - leng, yw0), 3 PSET (x20, yw0), 12: PSET (x10, yw0), 12 x10 = x1: y10 = y1: x20 = x2: y20 = y2: yw0 = yw: xm0 = xm RETURN assen: LINE (-w * 1.3, 0)-(w * 1.3, 0), 3 '''x LINE (0, -w * .8)-(0, w), 3 '''ct LINE (len0, -3)-(len0, 3), 15: LINE (-3, len0)-(3, len0), 15 '''len0 ; 0 LINE (-len0, -3)-(-len0, 3), 15 '''-len0 LINE (-w * 1.3, wx)-(-len0, wx), 7: LINE (0, wx)-(w * 1.3, wx), 7 '''x LINE (len0, wx - 3)-(len0, wx + 3), 15 '''len0 LINE (-len0, wx - 3)-(0, wx + 3), 15, B '''proper length CIRCLE (0, wx), 2, 15 '''observer COLOR 15 LOCATE 1, 37: PRINT "ct" LOCATE 17, 76: PRINT "x" LOCATE 28, 76: PRINT "x" COLOR 3: LOCATE 19, 74: PRINT USING "####"; xm COLOR 14: LOCATE 20, 72: PRINT USING "######"; x1 COLOR 15: LOCATE 2, 35: PRINT USING "####"; yw RETURN 'Show Controls and settings: '*************************** Controlwatch: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " Uniform 1D motion: a space-time description" PRINT : COLOR 15 PRINT " DISPLAY:": PRINT COLOR 7: PRINT " >>> Frames:" COLOR 3: PRINT " --- (x,ct) - spacetime " COLOR 7: PRINT " --- x - axis" PRINT PRINT " >>> World lines and objects:" COLOR 15: PRINT " --- observer, object at rest" COLOR 3: PRINT " --- moving object, measured: Lorentz coach" COLOR 7: PRINT " --- light rays of instantaneous perception" COLOR 14: PRINT " --- moving object, seen: Einstein coach (trail in spacetime)" COLOR 9: PRINT " --- ditto during approach (along x-axis)" COLOR 12: PRINT " --- ditto during regression (along x-axis)" COLOR 2: PRINT " --- moving object according to its own x'-axis: inverse Lorentz coach" PLAY "l21o3gp21fp21ep21d" GOSUB waitwatch RETURN 'wait after each intro screen '**************************** waitwatch: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 24 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN 'Choose settings '*************** setwatch: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " Uniform 1D motion: a space-time description" PLAY "o4l24d" PRINT : PRINT : COLOR 7 PRINT " >>> Choose settings:" PRINT : COLOR 3 PRINT " Velocity beta=v/c (.1 to .9, else END) : "; COLOR 11 INPUT "", beta IF ABS(beta) < .1 OR ABS(beta) > .9 THEN EXIT SUB gam = 1 / SQR(1 - beta * beta) PRINT : COLOR 3 PRINT " Proper length L0 (1 to 100, default=30) : "; COLOR 11: INPUT "", len0 IF len0 < 1 OR len0 > 100 THEN len0 = 30 PRINT : COLOR 2 PRINT " >>> Trail modes for:" PRINT COLOR 7: PRINT " 0= none (Default)" COLOR 7: PRINT " 1= light rays" COLOR 14: PRINT " 2= (seen) Einstein object" COLOR 3: PRINT " 3= (measured) Lorentz object" COLOR 2: PRINT " 4= inverse Lorentz object (own simul_ty)" COLOR 3: PRINT PRINT " Choose TRAIL : "; COLOR 11: INPUT "", spoor% IF spoor% < 0 OR spoor% > 4 THEN spoor% = 0 leng = len0 * SQR(1 - beta ^ 2) t0 = 1.5 * leng / beta: t1 = 2.5 * leng / beta w = 150: wx = -w * .87: ww = wx - 5: www = wx + 5 yend = t1: IF yend < w THEN yend = w RETURN END SUB SUB menu SCREEN 12 CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " >>> Menu" PRINT : PRINT : COLOR 7 PRINT " >>> Reading stuff" PRINT : COLOR 15 PRINT " 1 = GEDANKENexperiment how matter perceives itself" PRINT " 2 = measuring ain't seeing how matter perceives motion" PRINT : COLOR 7 PRINT " >>> Animated stuff" PRINT : COLOR 15 PRINT " 3 = GEDANKENsquad (see 1) operating 'in real time'" PRINT " 4 = uniform 1D motion a space-time description" PRINT " 5 = uniform 1D motion relativistic trains explained" PRINT " 6 = uniform 1D motion relativistic trains interactively" PRINT " 7 = uniform 2D motion a front line" PRINT " 8 = uniform 2D motion the GEDANKENsquad" COLOR 11 PLAY "l21o3ep21ep21fp21g" LOCATE 24: COLOR 14 PRINT " Credits: guido wuyts 1998" PRINT : PRINT : COLOR 11 INPUT " -> CHOICE (ENTER=END): ", men$ END SUB SUB relatrn1 'Relativistic Trains simulation 'by Guido Wuyts 1998 '****************************** SCREEN 12 x0 = -320: x1 = 319 WINDOW (x0, 480)-(x1, 0) GOSUB controltrain1 'drawing position for graphics '***************************** yt = 370 'rest length, light speed '************************ le0 = 40: c = 1 'choose velocity v '***************** GOSUB velocity 'next round '********** cyclus: CLS LOCATE 3, 1: COLOR 11 PRINT " RELATIVISTIC trains " PRINT PRINT " The train Lorentz missed and Einstein wanted to take" 'until final position '******************** WHILE t < tz0 'clear previous: '*************** col = 0: GOSUB tekenlor col2 = 0: GOSUB tekenein: GOSUB tekenlicht 'time incrementation '******************* t = t + dt 'new Lorentz train position '************************** x = v * t: col = 11 'new Einstein train position(s) approach, regression: '**************************************************** xxa = va * t: xxz = vz * t: col2 = 14 'to draw these properly: '*********************** IF t < 0 AND t >= ta0 THEN 'at approach xxv = xxa: lev = lea: vv = va ELSEIF t >= 0 AND t < t00 THEN 'at passing observer xxv = xxz: lev = xxz - (xxa - lea): vv = vz ELSEIF t >= t00 THEN : vv = vz 'at regression xxv = xxz: lev = lez END IF GOSUB displaylor 'data Lorentz's train GOSUB displayein 'data Einstein's train GOSUB tekenlor 'draw Lorentz's train GOSUB tekenein 'draw Einstein's train GOSUB tekenlicht 'draw first and last light rays GOSUB checkevents 'key positions 'temporize '********** tijd = TIMER: WHILE TIMER - tijd < .01: WEND 'check key '********* a$ = INKEY$ IF a$ = " " THEN t = tz0 + 1 'quit cycle WEND GOSUB lengths 'show various lengths GOSUB velocity: a$ = "" 'choose new velocity GOTO cyclus 'next round END 'draw Lorentz train '****************** tekenlor: 'train coach '*********** LINE (x, yt)-(x - le, yt - 15), col, B LINE (x, yt - 15)-(x, yt - 20), col: LINE (x - le, yt - 15)-(x - le, yt - 20), col 'track '***** LINE (-le + x0 * .7, yt - 20)-(x1 * .7, yt - 20), 7 'observer '******** LINE (-1, yt - 40)-(1, yt - 35), 7, BF: LINE (-1, yt - 45)-(1, yt - 40), 15, B CIRCLE (0, yt - 33), 2, 15 RETURN 'draw Einstein train '******************* tekenein: IF t >= ta0 THEN 'as soon as visible LINE (xxv, yt - 1)-(xxv - lev, yt - 14), col2, B LINE (xxv, yt - 15)-(xxv, yt - 20), col2 LINE (xxv - lev, yt - 15)-(xxv - lev, yt - 20), col2 END IF RETURN 'draw first and last light ray '***************************** tekenlicht: IF t < ta0 THEN PSET (c * (t - ta0), yt - 35), col2 IF t > tz1 AND t <= tz0 THEN PSET (c * (tz0 - t), yt - 35), col2 RETURN 'choose new velocity '******************* velocity: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " The train Lorentz missed and Einstein wanted to take" COLOR 7: PRINT : PRINT PRINT " >>> Choose setting:" COLOR 3: PRINT PRINT " Velocity beta (0.1 thru 0.99, ELSE=END) : "; PLAY "o4l24c" COLOR 11: : INPUT "", v IF v < .1 OR v > .99 THEN EXIT SUB 'beta and gamma factors; (Lorentz's train) length contraction '************************************************************ bet = v / c: gam = 1 / SQR(1 - bet * bet) le = le0 / gam '(Einstein's train) approach and regression lengths...: '****************************************************** lea = le / (1 - bet): lez = le / (1 + bet) '... and velocities: '******************* va = v / (1 - bet): vz = v / (1 + bet) 'time of starting and ending (front) positions of Lorentz train: '*************************************************************** ta2 = x0 * .7 / v: tz0 = x1 * .7 / v 'time of Lorentz train (front) position for first Einstein train appearance: '************************************************************************** ta1 = ta2 + le / (1 - bet) 'time of Lorentz train (front & tail) pos. for last Einstein train appearance: '**************************************************************************** tz1 = tz0 / (1 + bet) tz2 = tz1 + le / (c * (1 + bet)) 'initialize time counter t and increment: '**************************************** t = ta2: dt = 2 'time interval t = 0 -> t00 for transition approach-tail -> regression-front: '**************************************************************************** t00 = le / v 'initial appearance time for Einstein train: '******************************************* ta0 = ta2 * (1 - bet) + le / c CLS RETURN 'display data Lorentz train '************************** displaylor: 'GOSUB titel LOCATE 22, 1: COLOR 7 PRINT " Length: Velocity: Position:" COLOR col: PRINT PRINT USING " Lorentz's train: ###.# ##.### ####"; le; v; x RETURN 'display data Einstein train '*************************** displayein: IF t >= ta0 THEN LOCATE 26, 1: COLOR col2 PRINT USING " Einstein's train: ###.# ##.### ####"; lev; vv; xxv END IF RETURN 'check key positions '******************* checkevents: IF t >= ta2 THEN ev1$ = "Initial visible position of Lorentz's train tail: " ev2$ = "First light ray leaves farthest train side = tail " END IF IF x >= (v * ta2 - le) + le0 * gam THEN ev1$ = "Position of Lorentz's train front simultaneous with initial pos. " ev2$ = "of tail, according to HIM (inverted Lorentz train length) " END IF IF t >= ta1 THEN ev1$ = "Initial visible position of Lorentz's train front: " ev2$ = "First light ray reaches closer train side = front " END IF IF t >= ta0 THEN ev1$ = "Initial moment of perception. First light ray reaches observer: " ev2$ = "He starts to see Einstein's train " END IF IF t >= 0 THEN ev1$ = "Lorentz's AND Einstein's train fronts reach observer " ev2$ = "simultaneously... " END IF IF t >= t00 THEN ev1$ = "Lorentz's AND Einstein's train tails reach observer " ev2$ = "simultaneously... " END IF IF t >= tz1 THEN ev1$ = "Final visible position of Lorentz's train front: " ev2$ = "Last light ray leaves farthest train side = front " END IF IF t >= tz2 THEN ev1$ = "Final visible position of Lorentz's train tail: " ev2$ = "Last light ray reaches closer train side = tail " END IF IF t >= tz0 THEN ev1$ = "Final moment of perception. Last light ray reaches observer: " ev2$ = "He sees the last of Einstein's train " END IF 'display at key moment '********************* IF ev1$ <> evo1$ OR ev2$ <> evo2$ THEN LOCATE 16, 1: COLOR 7 PRINT " " + ev1$: PRINT " " + ev2$ LOCATE 28, 26: COLOR 2: PRINT "Push a key ..." evo1$ = ev1$: evo2$ = ev2$ PLAY "o2l21c": SLEEP: dum$ = INKEY$ LOCATE 16, 1: COLOR 0 PRINT " " + ev1$: PRINT " " + ev2$ LOCATE 28, 26: COLOR 2: PRINT "SPACE = new..." END IF RETURN 'display characteristic lengths '****************************** lengths: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " The train Lorentz missed and Einstein wanted to take" PRINT : PRINT : COLOR 15 PRINT " Now really, what's all these lengths about?" PRINT : COLOR 7 PRINT USING " 1. proper length of observer's train: ###"; le0 PRINT : PRINT : COLOR 11 PRINT USING " 2. contracted length of Lorentz's train: ###"; le PRINT : PRINT : COLOR 3 PRINT USING " 3. length of Lorentz train acc. to HIS simultaneity:###"; le0 * gam PRINT " remark: L2/L1 = L1/L3 = 1/gamma(v) " PRINT : PRINT : COLOR 14 PRINT USING " 4. approach length of Einstein's train: ###"; lea PRINT : PRINT PRINT USING " 5. regression length of Einstein's train: ###"; lez LOCATE 28, 26: COLOR 2: PRINT "Push a key ..." LINE (150, 340)-(150 + le0, 340 - 15), 15, B '1. LINE (150, 290)-(150 + le, 290 - 15), 11, B '2. LINE (150, 240)-(150 + le0 * gam, 240 - 15), 3, B '3. LINE (150, 175)-(150 + lea, 175 - 15), 14, B '4. LINE (150, 125)-(150 + lez, 125 - 15), 14, B '5. PLAY "o2l21c": SLEEP: dum$ = INKEY$ RETURN 'Show controls: '*************** controltrain1: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " The train Lorentz missed and Einstein wanted to take" PRINT : PRINT : COLOR 15 PRINT " DISPLAY:": PRINT : COLOR 15 PRINT " o observer" COLOR 14 PRINT " . light ray" COLOR 11 PRINT " --- (physical) Lorentz train" COLOR 14 PRINT " --- (seen) Einstein train" PRINT PRINT : COLOR 15 PRINT " SETTINGS:" PRINT : COLOR 7 PRINT " Choose train's velocity as a fraction of light speed" PLAY "l21o3gp21fp21ep21d" GOSUB waittrn1 RETURN 'wait after each intro screen '**************************** waittrn1: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 24 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN END SUB SUB relatrn2 'Relativistic Trains 'by Guido Wuyts 1998 '******************* SCREEN 12 WINDOW (1, 1)-(640, 480) 'Intro screen '************ GOSUB controltrain 'Initialize parms '**************** 'define train data '***************** 'data per coach '************** 'TYPE def see main 'data per train '************** 'TYPE def see main 'coach and train arrays '********************** n = 20 REDIM cch(1 TO 2, 1 TO n) AS coach REDIM trn(1 TO 2) AS train 'general parms '************* RANDOMIZE TIMER x0 = INT(260 + RND * 120): 'absc. vanishing point y0 = INT(160 + RND * 160) 'ordin. vanishing point yy = 480 'display window height h = yy - y0 'vanishing point display ordinate le0 = 40 'coach rest length B = le0 * .3 'closest distance displayed vfac = .02 'play speed DIM v(-9 TO 9) 'velocities table v(1) = .05: v(2) = .11: v(3) = .2: v(4) = .33: v(5) = .5 v(9) = .95: v(8) = .89: v(7) = .8: v(6) = .67: v(0) = 0 FOR i = 1 TO 9: v(-i) = -v(i): NEXT 'trains parms '************ trn(1).xv = 520: trn(2).xv = 90 'display abscis limits for crossing train, and mine trn(1).kv = 0: trn(2).kv = 0 'velocity array index trn(1).col = 7: trn(2).col = 7 'color parm trn(1).le = le0: trn(2).le = le0 'coach observed lengths trn(1).dv = 0: trn(2).dv = 0 'velocity increment trn(1).bet = 0: trn(2).bet = 0 'beta factor trn(1).lorein = 0: trn(2).lorein = 0 'train type switch trn(1).dy = 0: trn(2).dy = 0 'distance FOR i = 1 TO n: cch(1, i).dist = i * le0 'coach distances cch(2, i).dist = i * le0 NEXT FOR jv = 1 TO 2 'display train data GOSUB displaytrn NEXT jv FOR i = 1 TO n cch(1, i).ordn = (cch(1, i).dist - B) * h / cch(1, i).dist 'coachs' initial display ordinates, cch(2, i).ordn = cch(1, i).ordn cch(2, i).dist = cch(1, i).dist 'ditto my train cch(2, i).absc = x0 + (yy - y0 - cch(2, i).ordn) * (trn(2).xv - x0) / (yy - y0) 'parms my train cch(2, i).hght = yy * (cch(2, i).absc - x0) / (trn(2).xv - x0) NEXT i 'display cycle for new positions '******************************* DO 'increment distance acc. to velocity '*********************************** trn(1).dy = trn(1).dy - le0 * trn(1).dv trn(2).dy = trn(2).dy - le0 * trn(2).dv 'if beyond closest display distance: 'move' 1 coach ahead: '********************************************************* IF trn(1).dy < B THEN trn(1).dy = trn(1).dy + trn(1).le IF trn(2).dy < B THEN trn(2).dy = trn(2).dy + trn(2).le 'if beyond 1 coach's display distance: 'move' 1 coach back: '********************************************************** IF trn(1).dy > B + trn(1).le THEN trn(1).dy = trn(1).dy - trn(1).le IF trn(2).dy > B + trn(2).le THEN trn(2).dy = trn(2).dy - trn(2).le FOR j = 1 TO 2 FOR i = 1 TO n 'new positions coaches cch(j, i).ordnold = cch(j, i).ordn 'get old values cch(j, i).abscold = cch(j, i).absc cch(j, i).hghtold = cch(j, i).hght cch(j, i).dist = trn(j).dy + (i - 1) * trn(j).le 'new coach positions... cch(j, i).ordn = (cch(j, i).dist - B) * h / cch(j, i).dist '...and display ordinates,... cch(j, i).absc = x0 + (yy - y0 - cch(j, i).ordn) * (trn(j).xv - x0) / (yy - y0)'...abscisses... cch(j, i).hght = yy * (cch(j, i).absc - x0) / (trn(j).xv - x0) '...and heights NEXT i NEXT j 'draw trains '*********** FOR jv = 1 TO 2 GOSUB drawtrn NEXT jv 'scan keys '********* a$ = INKEY$ SELECT CASE a$ CASE "" 'proceed CASE CHR$(0) + "K" 'CSR LEFT = decrement velocity IF trn(1).kv > -9 THEN trn(1).kv = trn(1).kv - 1: jv = 1: GOSUB speed CASE CHR$(0) + "M" 'CSR RGHT = increment velocity IF trn(1).kv < 9 THEN trn(1).kv = trn(1).kv + 1: jv = 1: GOSUB speed CASE CHR$(0) + "H" 'CSR UP = increment play speed IF trn(2).kv < 9 THEN trn(2).kv = trn(2).kv + 1: jv = 2: GOSUB speed CASE CHR$(0) + "P" 'CSR DN = decrement play speed IF trn(2).kv > -9 THEN trn(2).kv = trn(2).kv - 1: jv = 2: GOSUB speed CASE "+" ''+' = increment play speed IF vfac < .1 THEN vfac = vfac * 1.5: jv = 1: GOSUB speed jv = 2: GOSUB speed CASE "-" ' '-'=decrement play speed IF vfac > .001 THEN vfac = vfac / 1.5: jv = 1: GOSUB speed jv = 2: GOSUB speed CASE "1" ''1' = cycle through trains trn(1).lorein = (1 + trn(1).lorein) MOD 3 jv = 1: GOSUB speed CASE "2" ''2' = cycle through trains trn(2).lorein = (1 + trn(2).lorein) MOD 3 jv = 2: GOSUB speed CASE " " 'SPACE = Intro & proceed GOSUB controltrain: FOR jv = 1 TO 2 GOSUB drawtrn: GOSUB displaytrn NEXT jv CASE CHR$(27) 'SPACE = END EXIT SUB CASE ELSE 'PAUSE COLOR 15: LOCATE 28, 38: PRINT "PAUSE..." PLAY "o4l24c" SLEEP: a$ = INKEY$: IF a$ = " " THEN EXIT SUB ELSE a$ = "" COLOR 8: LOCATE 28, 38: PRINT USING "x##.### "; vfac * 50 END SELECT LOOP EXIT SUB '******************************************************************* 'Subroutines: '******************************************************************* 'Draw train '********** drawtrn: col = trn(jv).col LINE (x0, y0)-(trn(jv).xv, yy), col: LINE (x0, y0)-(trn(jv).xv, 0), col FOR i = 1 TO n LINE (cch(jv, i).abscold, yy - cch(jv, i).ordnold)-(cch(jv, i).abscold, yy - cch(jv, i).ordnold - cch(jv, i).hghtold), 0 LINE (cch(jv, i).absc, yy - cch(jv, i).ordn)-(cch(jv, i).absc, yy - cch(jv, i).ordn - cch(jv, i).hght), col NEXT i RETURN 'new velocity kv -> v(kv) '************************ speed: trn(jv).bet = v(trn(jv).kv) 'train velocity bet = trn(jv).bet SELECT CASE trn(jv).lorein 'which train? CASE 0 'einstein train trn(jv).le = le0 * SQR(1 - bet * bet) / (1 - bet) 'seen length trn(jv).dv = vfac * bet / (1 - bet) 'seen velocity CASE 1 'lorentz train trn(jv).le = le0 * SQR(1 - bet * bet) 'contracted length trn(jv).dv = vfac * bet 'velocity CASE 2 'lorentz train in train's proper simultaneity trn(jv).le = le0 / SQR(1 - bet * bet) 'inverse contracted length trn(jv).dv = vfac * bet 'velocity END SELECT IF trn(jv).kv < -5 THEN 'Doppler shifts trn(jv).col = 12 ELSEIF trn(jv).kv < 0 THEN trn(jv).col = 6 ELSEIF trn(jv).kv = 0 THEN trn(jv).col = 7 ELSEIF trn(jv).kv <= 5 THEN trn(jv).col = 3 ELSE trn(jv).col = 9 END IF GOSUB displaytrn RETURN 'Intro screens '************* intro: 'pause after screens '******************* waiting2: COLOR 14: LOCATE 26, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 28, 25 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN 'display train data: '******************* displaytrn: COLOR 8: LOCATE 28, 38: PRINT USING "x##.### "; vfac * 50 COLOR trn(jv).col bet = trn(jv).bet SELECT CASE trn(jv).lorein CASE 0: printv = bet / (1 - bet): train$ = "Einstein": simul$ = "optical " CASE 1: printv = bet: train$ = "Lorentz ": simul$ = "mine " CASE 2: printv = bet: train$ = "Lorentz ": simul$ = "train's " END SELECT SELECT CASE jv CASE 1: yv = 67 CASE 2: yv = 1 END SELECT LOCATE 20, yv: PRINT "train:" LOCATE 21, yv: PRINT train$ LOCATE 23, yv: PRINT "simul_ty:" LOCATE 24, yv: PRINT simul$ LOCATE 26, yv: PRINT USING "v/c=###.##"; trn(jv).bet LOCATE 27, yv: PRINT USING "spd=###.##"; printv LOCATE 28, yv: PRINT USING "len=####"; trn(jv).le RETURN 'Show controls: '*************** controltrain: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " The train Lorentz missed and Einstein wanted to take: run it!" PRINT : PRINT : COLOR 15 PRINT " DISPLAY:" COLOR 12: PRINT " --"; COLOR 6: PRINT "--"; COLOR 3: PRINT "--"; COLOR 9: PRINT "-- "; COLOR 7: PRINT " trains at approach (Doppler blue) and regression (Doppler red)" PRINT : COLOR 15 PRINT " CONTROLS:" COLOR 7 PRINT " Arrows: increase/decrease velocity beta (between -1 and +1)" COLOR 2 PRINT " RT/LEFT = right train" PRINT " UP/DOWN = left train" COLOR 7 PRINT " Cycle between Einstein train, Lorentz train, and its inversion:" COLOR 2 PRINT " '1' = right train" PRINT " '2' = left train" COLOR 7 PRINT " Simulation play speed:" COLOR 2 PRINT " '+' = higher" PRINT " '-' = lower" PRINT PRINT " SPACE = show this Intro and continue" PRINT " ESCAPE = END" PRINT " others = PAUSE" PLAY "l21o3gp21fp21ep21d" GOSUB waittrn RETURN 'wait after each intro screen '**************************** waittrn: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 24 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN END SUB SUB seefront 'How does an observer see a progressing front? '********************************************* SCREEN 12 xl = -500: xr = 300 WINDOW (xl, 240)-(xr, -240) 'PLAY "o4l24d" GOSUB introseefront seefront: GOSUB veloseefront CLS n = 40 'nr. of front pawns dy = 240 / n 'distance REDIM x(n), y(n), xo(n) FOR j = 0 TO n: y(j) = j * dy: NEXT j sig = -1 'SGN(front pos.): approach OR regression FOR ctc = INT(xl / (bet * dt)) * dt TO (1 + 1 / bet) * xr STEP dt 'cycle: CIRCLE (0, 0), 3, 14 'observer t = TIMER xf = bet * ctc + i * le 'Lorentz front sig = SGN(xf) x0 = xf / (1 + sig * bet) FOR j = 0 TO n 'Calculate Einstein front delt = x0 * x0 * (1 + sig * bet) * (1 + sig * bet) + y(j) * y(j) * (1 - bet * bet) x(j) = (x0 / (1 - sig * bet)) - bet * SQR(delt) / (1 - bet * bet) IF x(j) < 0 THEN col = 11 ELSE col = 12 'Doppler IF dspl$ = "1" THEN 'mode 1 = update E. front CIRCLE (xo(j), y(j)), 1, 0: CIRCLE (xo(j), -y(j)), 1, 0 END IF PSET (xfo, y(j)), 0: PSET (xfo, -y(j)), 0 IF dspl$ = "1" THEN CIRCLE (x(j), y(j)), 1, col: CIRCLE (x(j), -y(j)), 1, col ELSE IF j <> 0 THEN 'mode 2 = trail E. front LINE (x(j - 1), y(j - 1))-(x(j), y(j)), col LINE (x(j - 1), -y(j - 1))-(x(j), -y(j)), col END IF END IF PSET (xf, y(j)), 7: PSET (xf, -y(j)), 7 'Lorentz front xo(j) = x(j) NEXT j xfo = xf WHILE TIMER - t < .1: WEND a$ = INKEY$ 'scan controls SELECT CASE a$ CASE "" CASE CHR$(13) GOTO seefront CASE " " GOSUB introseefront CASE CHR$(27) EXIT SUB CASE ELSE PLAY "o4l24d": SLEEP: a$ = INKEY$: a$ = "" END SELECT NEXT ctc 'goseefront: PLAY "o4l24d": SLEEP: a$ = INKEY$ GOTO seefront EXIT SUB 'Subroutines: '************ 'New settings '************ veloseefront: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " Seeing a progressing front line" COLOR 7: PRINT : PRINT PRINT " >>> Choose settings:" PRINT : COLOR 3 PRINT " Velocity beta=v/c (0+ to .98, ELSE=END) :"; PLAY "o4l24d" COLOR 11: INPUT "", bet IF bet = 0 THEN EXIT SUB IF bet < 0 OR bet > .98 THEN EXIT SUB PRINT : COLOR 3 PRINT " Simulation speed (2 to 25, ELSE=10) :"; COLOR 11: INPUT "", dt IF dt < 2 OR dt > 25 THEN dt = 10 PRINT : COLOR 2 PRINT " >>> Display modes for front:" PRINT : COLOR 7 PRINT " 1 = show only current front position (Default)" PRINT " 2 = trail front (don't clear past positions)" PRINT : COLOR 3 PRINT " Choose mode :"; COLOR 11: INPUT "", dspl$ IF dspl$ <> "2" THEN dspl$ = "1" RETURN introseefront: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " Seeing a progressing front line" PRINT : PRINT : COLOR 15 PRINT " DISPLAY:" COLOR 14 PRINT " o Observer" COLOR 7 PRINT " ...... Lorentz front (physical position)" COLOR 11: PRINT " ooo"; : COLOR 12: PRINT "ooo "; COLOR 7: PRINT "Einstein front (seen position) "; COLOR 11: PRINT "approach, "; : COLOR 12: PRINT "regression" COLOR 15: PRINT PRINT " SETTINGS:": COLOR 7 PRINT " The settings define velocity (fraction of light speed), " PRINT " simulation speed, and display mode (1 = show only current " PRINT " front position, 2 = trace positions)" PRINT : COLOR 15 PRINT " CONTROLS:" COLOR 2 PRINT " ENTER = New settings" PRINT " SPACE = This intro and proceed" PRINT " ESCAPE = END" PRINT " Other = PAUSE" PLAY "l21o3gp21fp21ep21d" GOSUB waitseefront CLS RETURN 'pause after screens '******************* waitseefront: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 25 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN END SUB SUB seesquad 'How does an observer see the GEDANKENSQUAD? '********************************************* SCREEN 12 xl = -500: xr = 300 WINDOW (xl, 240)-(xr, -240) 'PLAY "o4l24d" GOSUB introseesqd seesquad: 'explanations compare option 7 = seefront GOSUB velo CLS le0 = 40: le = le0 * SQR(1 - bet * bet) m = n: IF m < 4 THEN m = 4 'm columns, 2n+1 rows REDIM x(-m TO m, n), y(n), xf(-m TO m), xo(-m TO m, n), xfo(-m TO m) FOR j = 0 TO n: y(j) = j * le0: NEXT j sig = -1 FOR ctc = INT(xl / (bet * dt)) * dt TO (1 + 1 / bet) * xr STEP dt CIRCLE (0, 0), 3, 14 t = TIMER FOR i = -m TO m xfo(i) = xf(i) FOR j = 0 TO n xo(i, j) = x(i, j) NEXT j NEXT i FOR i = -m TO m xf(i) = bet * ctc + i * le sig = SGN(xf(i)) x0 = xf(i) / (1 + sig * bet) FOR j = 0 TO n delt = x0 * x0 * (1 + sig * bet) * (1 + sig * bet) + y(j) * y(j) * (1 - bet * bet) x(i, j) = (x0 / (1 - sig * bet)) - bet * SQR(delt) / (1 - bet * bet) NEXT j NEXT i SELECT CASE modseesqd$ CASE "1" FOR i = -n TO n xf(i) = bet * ctc + i * le sig = SGN(xf(i)) x0 = xf(i) / (1 + sig * bet) FOR j = 0 TO n delt = x0 * x0 * (1 + sig * bet) * (1 + sig * bet) + y(j) * y(j) * (1 - bet * bet) x(i, j) = (x0 / (1 - sig * bet)) - bet * SQR(delt) / (1 - bet * bet) IF x(i, j) < 0 THEN col = 11 ELSE col = 12 CIRCLE (xo(i, j), y(j)), 3, 0: CIRCLE (xo(i, j), -y(j)), 3, 0 PSET (xfo(i), y(j)), 0: PSET (xfo(i), -y(j)), 0 CIRCLE (x(i, j), y(j)), 3, col: CIRCLE (x(i, j), -y(j)), 3, col PSET (xf(i), y(j)), 7: PSET (xf(i), -y(j)), 7 xo(i, j) = x(i, j) NEXT j xfo(i) = xf(i) NEXT i CASE "2" i = -m + 1 FOR j = 1 TO n LINE (xo(i - 1, j), y(j))-(xo(i, j), y(j)), 0 LINE -(xo(i, j - 1), y(j - 1)), 0 LINE -(xo(i - 1, j - 1), y(j - 1)), 0 LINE -(xo(i - 1, j), y(j)), 0 NEXT j FOR i = -m + 1 TO m FOR j = 1 TO n IF x(i - 1, j - 1) < 0 THEN col = 11 ELSE col = 12 LINE (xo(i, j), y(j))-(xo(i, j - 1), y(j - 1)), 0 LINE (xo(i - 1, j - 1), y(j - 1))-(xo(i - 1, j), y(j)), 0 PSET (xfo(i), y(j)), 0: PSET (xfo(i - 1), y(j)), 0 PSET (xfo(i), y(j - 1)), 0: PSET (xfo(i - 1), y(j - 1)), 0 LINE (x(i - 1, j), y(j))-(x(i, j), y(j)), col LINE -(x(i, j - 1), y(j - 1)), col LINE -(x(i - 1, j - 1), y(j - 1)), col LINE -(x(i - 1, j), y(j)), col PSET (xf(i), y(j)), 7: PSET (xf(i - 1), y(j)), 7 PSET (xf(i), y(j - 1)), 7: PSET (xf(i - 1), y(j - 1)), 7 NEXT j NEXT i END SELECT WHILE TIMER - t < .1: WEND a$ = INKEY$ SELECT CASE a$ CASE "" CASE CHR$(13) GOTO seesquad CASE " " GOSUB introseesqd CASE CHR$(27) EXIT SUB CASE ELSE PLAY "o4l24d": SLEEP: a$ = INKEY$: a$ = "" END SELECT NEXT ctc 'goseesqd: PLAY "o4l24d": SLEEP: a$ = INKEY$: a$ = "" GOTO seesquad EXIT SUB 'Subroutines: '************ 'New settings: '************* velo: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " Seeing the GEDANKENsquad" PRINT : PRINT : COLOR 7 PRINT " >>> Choose settings:" PRINT : COLOR 3 PRINT " Velocity beta=v/c (0+ to .98, ELSE=END) :"; PLAY "o4l24d" COLOR 11: INPUT "", bet IF bet <= 0 OR bet > .98 THEN EXIT SUB PRINT : COLOR 3 PRINT " Simulation speed (2 to 25, ELSE=10) : "; COLOR 11: INPUT "", dt IF dt < 2 OR dt > 25 THEN dt = 10 PRINT : COLOR 2 PRINT " >>> Number of rows = 2N+1 (5 to 13) " PRINT : COLOR 3 PRINT " Choose N (2 to 6, ELSE=3) : "; COLOR 11: INPUT "", n IF n < 2 OR n > 6 THEN n = 3 PRINT : COLOR 2 PRINT " >>> Display mode for Einstein squad" PRINT : COLOR 7 PRINT " 1 = grid of pawns (Default)" PRINT " 2 = half grid of adjacent 'squares'" PRINT : COLOR 3 PRINT " Choose display mode : "; INPUT "", modseesqd$ IF modseesqd$ <> "2" THEN modseesqd$ = "1" RETURN introseesqd: CLS : LOCATE 3, 15: COLOR 11 PRINT "RELATIVITY: measuring [and/ain't] seeing " PRINT PRINT " Seeing the GEDANKENsquad" PRINT : PRINT : COLOR 15 PRINT " DISPLAY:" COLOR 14 PRINT " o Observer" COLOR 7 PRINT " ...... Lorentz squad (physical position)" COLOR 11: PRINT " ooo"; : COLOR 12: PRINT "ooo "; COLOR 7: PRINT "Einstein squad (seen position) "; COLOR 11: PRINT "approach, "; : COLOR 12: PRINT "regression" PRINT : COLOR 15 PRINT " SETTINGS:": COLOR 7 PRINT " The settings include: velocity (fraction of light speed); " PRINT " simulation speed; number of rows in (half) the squad; and" PRINT " display mode: squad as a grid of pawns, or as (half) a grid" PRINT " of adjacent squares (say, adjacent trains!)" PRINT : COLOR 15 PRINT " CONTROLS:" COLOR 2 PRINT " ENTER = New settings" PRINT " SPACE = This intro and proceed" PRINT " ESCAPE = END" PRINT " Other = PAUSE" PLAY "l21o3gp21fp21ep21d" GOSUB waitseesqd CLS RETURN 'pause after screens '******************* waitseesqd: COLOR 14: LOCATE 25, 27: PRINT "Credits: guido wuyts 1998" klr = 11: a$ = "" WHILE a$ = "" COLOR klr: LOCATE 27, 25 PRINT "-> Push a key...(ESCAPE=END)" tijd = TIMER: WHILE TIMER - tijd < .5: WEND IF klr = 11 THEN klr = 5 ELSE klr = 11 a$ = INKEY$ WEND IF a$ = CHR$(27) THEN EXIT SUB a$ = "": CLS : COLOR 15 RETURN END SUB