Q: Would you please explain what this math does?
A: The math matches the camera position function to the image placement function.
The change in image position follows a pattern 0 + 1/2 + 1/4 + 1/8 .... I could see that the limit was 1 and that the nth term was 1 - 1/2^n. I also noticed that 2^n equaled 100 times the zoom displayed in the scene. Solving for n = ln(100*zoomDisplay)/ln(2). Comparing zoomDisplay to Scene.Camera.zoom yields zoomDisplay = Scene.Camera.zoom/150. Back substituting yields the original equation.
I initially made the springs equal wavelengths, but I couldn't get the bright and dark effect I was looking for. As far as "exact same frequency", that's true for a single mode stabilized laser. That may not be true for a dual mode laser with a polarizing beam splitter.
Xray,
Interesting site. Reminds me of the "capacitor barn" used for the first radio transmission across the Atlantic (I'm going from memory, so might not be true).
Nice work. I added a shuffle function and added it as a response. Oh, and I may have changed some of the code slightly. I will remove the response scene upon request.
Thanks.
1. I will look into this deeper. FYI, score := math.toInt(100.0 * sumOK / (16.0 + scene.my.clickCount - sumOK)), where sumOK is the sum of images (not wood) showing.
2. Fixed.
The debug info is what I expect since it follows the function I listed above. The score increases when you get a pair right, decreases when you get a pair wrong, and finally shows the percentage of right guesses divided by the total number of clicks. I'm willing to change the function if you can think of a function that makes more sense. You also have the option of changing the function yourself and re-posting the scene. You could also add a time box so people could brag about the fastest solution.
Q: Please define m, g, and k in the Lspring formula.
A: m = mass, g = gravitational constant, k = spring constant, Lspring = spring target (free) length.
Q: Increasing the Simulation Speed to about 1.75 or 2.0 makes the scenes a bit more interesting.
A: We might be able to increase the frequency by reducing the mass and adjusting the spring length accordingly.
Q: A string ("rope" in Algodoo), makes no difference in the behavior of the spring/weight oscillator.
A: I agree. IRL a string is easier to use. In Algodoo it's easier to just change the spring length.
Q: WHY does the spring/weight combo behave in the manner described?
A: If you search on "elastic pendulum" you will find a number of sources that describe the math behind the general behavior. Info on "resonant elastic pendulum" is harder to find. I looked thru many sources looking for a simple equation like the one in my scene but couldn't find it so I ended up deriving it myself.
Q: The buttons on the GUI control panel are a bit sluggish.
A: Yes, that's because Algodoo is detecting button clicks not the OS. If the scene is running at 100% simulation time, then the mouse is checked 5 times a second. Since a button click requires a nousedown and mouseup event, the click has to be longer than 0.4 seconds. The mouse check rate can be increased by changing "_c > 11 ? {" to a lower value in the update event for each button. "_c > 11 ? {" was chosen as a compromise between button responsiveness and scene lag.