Jump to content

ndx

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by ndx

  1. It's the centrifuge force. F = m . ω2 . R m mass (kg), ω rotation (radians/second), R radius (m). Then if you consider a frictionless glide of the ball on the arm, applying an horizontal force F on the ball will result in a vertical force F' on it as well, the sum F + F' being aligned with the arm. If alpha is then angle between the arm and the horizontal plan, F' / F = tan alpha. So the vertical force will be F' = m x ω2 x R x tan alpha.
  2. The major thing you forgot is Inertia, I guess in your game the mass moves. Gravity (9.8 m/s2) and spring force (compression or depression, proportional to the change of length) should be fine. Project that on x and y axes. Then apply sum(forces) = mass x acceleration and you will now what is the acceleration of your mass, on x and y axes. Then integrate, delta speed = dela time x acceleraton. Use a small constant for delta time and let the computer work, compute several positions per second, display only a few of them. Then integrate again, delta postion = delta time x speed. Finally, to manage the mass on the springs, split your springs in multiple small springs, each one having a mass and a straight shape. You will probably need to add a force (a torque in fact) that tend to keep two consecutive sections aligned.
  3. I'm not sure you still need help, if so I think I can, just let me know. In your code I see: if function(x) == False: None else: OtherCode(). 1. instead of 'None', you should use 'pass'. 2. Don't use '== False', use '!function(x)' it's easier to read. 3. Don't negate when you don't need, your code can be written: if function(x): OtherCode()
  4. For algorithms, where you have to sort an array, find a substring or anything this kind, an usual approach is to take some examples. write them down and analyse how you find the solution, as a human. Then try to figure out how a computer can find the solution. And the ability to feel things and write code that do what you need to do comes with experience, so the best thing to do is just to write code
  5. The laptop have a huge advantage: it will not stop in case of power failure. If you have no main supply for let's say 1 second, with a laptop the music will come back after 2 to 3 seconds (time for the amplifiers to restart), while with a SFF you'll need to reboot... That's at least 30 seconds of silence You never expect a power failure, but it happens quite often.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.