Re: Well, to me, the peak seems to be the highest possible value. Am I doing something wrong?by Walrus (no login)
from looking at your program, it looks like it's designed to find the highest value of t2 (although i can't figure out what "best - cur" is supposed to accomplish because i dont see any other instance of "cur" in the program.. did you mean "best = t2"?). if that's what the program's looking for, of course it doesn't peak. look at the equation. as v gets closer and closer to c, the denomator in the equation gets closer and closer to 0.. (square root of 1 - v ^ 2 / c ^ 2, where v ^ 2 is equal to c ^ 2 will be sqr(1 - 1), which is 0). and any time the denominator of a fraction is 0 and the numerator is non-zero, the answer is infinity. so t2 just keeps getting larger and larger and larger until v equals c, at which point t2 equals infinity.
what i was talking about peaking was the amount of time it would take for the passenger to see the lightning bolt behind him. t2 plays a factor in this, but you've also got to factor in the amount of time it takes (in t1 time) for the light to reach the passenger, and then use that and your t2 calculation (which in your program seems to be based on a t1 = 1, so that t2 is the relationship of time for the passenger and time for the earth, so a simple multiplication will do--after taking the reciprical since we want to "see" from coordinate system 2 instead of from coordinate system 1).
making a program for it seems like a good idea though. i didnt think about it, which is pretty dumb being on a programming messageboard X-D. i worked most of the equations out on a piece of paper and used a TI for numerical calculations.
|Response Title||Author and Date|
|Thanks for the help. I made improvements, but something still seems wrong.||on May 5|
|Re: Thanks for the help. I made improvements, but something still seems wrong.||Walrus on May 7|
|*ok||on May 7|
Newbies usually go to www.qbasic.com and click on
The QBasic Forum
Forum regulars have their own ways, which include The QBasic Community Forums