Questions tagged [momentum]

80 questions
1
vote
1 answer

Stop an SKPhysicsBody mid-motion

If an SKSpriteNode has had an impulse applied to its SKPhysicsBody so that it now has momentum, is there a way I can get it to immediately stop moving? Applying an equal and opposite impulse would probably work in theory, but I would like to know if…
Lahav
  • 781
  • 10
  • 22
1
vote
0 answers

Creating a Motion Update in JavaFX with Java 8

I had a simple JavaFX game where I moved the character with key codes. I now want to improve upon this and add some "momentum". But with my run method, the my character does not move. Please help. Here is my code with the previous method of moving…
Zombo
  • 11
  • 1
1
vote
1 answer

How to simulate a strong joint between two rigid bodies?

I'm having to write my own physics code (if you're curious why, see here). Simulating a single rigid body is pretty simple. But we have assemblies (simulated space colonies) which are composed of multiple rigid bodies, joined by rotating…
Joe Strout
  • 2,634
  • 2
  • 28
  • 39
1
vote
1 answer

Multilayer perceptron for ocr works with only some data sets

NEW DEVELOPMENT I recently used OpenCV's MLP implementation to test whether it could solve the same tasks. OpenCV was able to classify the same data sets that my implementation was able to, but unable to solve the one's that mine could not. Maybe…
Josh
  • 63
  • 6
1
vote
1 answer

How to prevent flickering on a SlickGrid when updating data and using momentum scroll?

I had created a SlickGrid to be used on an IOS device. I update the data at an interval of 1 second (through a web socket). I had added momentum scrolling on it by adding the following css: .slick-viewport { overflow-y: scroll; …
utsavberi
  • 21
  • 4
1
vote
1 answer

Need Unity character controller to make sharp 90 degree turns and not slide when turning

I'm using the first person controller for my characters movement. On a left arrow keypress, I'd like the character to instantly rotate 90 degrees and keep moving forward. Currently, when I hit the arrow key, the character makes the sharp 90 degree…
Paul Mengelt
  • 176
  • 1
  • 6
1
vote
1 answer

Collision Handling in Javascript - Particles Get Stuck

I am trying to recreate this, and I have been fairly successful. I am having issues with the collision handling though. Although the collision handling seems to work, it has very strange behavior. Here is what I have so far. This is the code that…
Conner Ruhl
  • 1,693
  • 4
  • 20
  • 31
1
vote
1 answer

Obtaining momentum quaternion from two quaternions and timestep

I have a quaternion which holds the rotation of an object. During the frame I modify it and obtain a new quaternion. I can calculate a quaternion that rotates from 'previous frame' to 'current frame'. I cannot figure out, however, how to 'divide by…
0
votes
3 answers

momentum rotation of image in iOS

I'm new to iOS graphics and animation and would like to know to how to accomplish the effect of momentum rotation of an image upon flick as seen in the video below. http://www.youtube.com/watch?v=ZIQs-OWgkgI (now broken) Even when not flicked the…
Sanjiv Jivan
  • 1,922
  • 18
  • 19
0
votes
1 answer

Objective C: Camera Swipe from user's finger

My question is what algorithm or math should I use to keep the screen swipe momentum TO KEEP SCROLLING if the user does a fast swipe. Example: There is an image on the screen that revolves in a circle, if the user swipes the camera slow, it will…
0
votes
0 answers

How to Implement Inertial / Momentum Scrolling in react?

I am trying to implement inertial / momentum scrolling in my react app. The intended behaviour is that when the "up or down arrow key" is pressed, it begins scrolling, the scrolling velocity would keep increasing as the key remains pressed, and when…
0
votes
1 answer

Correct way of implementing weight update momentum NN

I don't understand the correct procedure for intorducing momentum in neural network training update: suppose you have a dataset of 100 and a minibatch of 90 and train a NN for 2 epochs. I will express the iteration instances with "_n" and the…
PwNzDust
  • 271
  • 2
  • 9
0
votes
0 answers

backpropagation with momentum for MLP

I'm trying to implement backpropagation with momentum but in trainig loop instead of getting smaller loss, i get higher and higher I have written such function for backpropagation. I have checked code many times and to be honest I can't notice any…
Ben
  • 19
  • 2
0
votes
1 answer

Is it something wrong with torch.optim.SGD with momentum

It seems that torch.optim.SGD may have a bug when momentum is added. From my understanding, one can implement SGD with momentum by simply providing some value for the momentum argument, such as torch.optim.SGD(params, lr=0.01, momentum=0.9) I…
user559678
  • 11
  • 2
0
votes
0 answers

momentum with condition ema

I would insert in the following script the condition to see signals LONG, if signal is above Ema200 and Short if signal is below ema200 if I insert condition here it doesn't work: if (close>ema(close, 200) and mom0 > 0 and mom1 >…