motion

maths: motion depending on time

hello, i have a mathematical problem: i have a function where the only parameter is the current time. the return should be a position which is used to place an object on a certain place. int position(int time) { int x = 0; //TODO implement x depending on time return x; } so basically the function is called every frame to put...

How do I stop a Flash CS4 Motion Tween?

I've started using Motion Tweening in CS4 and I am puzzled by something with how the durations are set. The best way I can describe this is by comparing it to what are now called Classic Tweens… In a Classic Tween, I set the beginning and end keyframes of a particular animation, and when the playhead reaches the ending keyframe, the ani...

How to get really smooth moving objects using openGL

Dear reader, I'm working on an application where I draw a circular progress indicator which slowly gets "filled", here you can see a couple of images. I'm using intermediate mode and I'm only drawing this circular shape by drawing the vertices at each frame update (see code below). When the circle fills up the border line between the wh...

How can I remove the shake of a handheld camera using AviSynth?

I have a number of high quality videos taken of a stage performances. The video subject is stationary but the handheld video moves around a lot. I am trying to use AviSynth to remove the shake and motion of the video. I have had partial success using Depan and MVTools. For example: source=ConvertToYV12() vectors = source.MVAnalyse(isb...

motionEnded not being called (no view controller)

I think I've done all I should to detect a shake, but motionEnded:withEvent: never gets called. (One wrinkle is that I don't have a UIViewController - my app is based on the "OpenGL ES App" template.) I've added application.applicationSupportsShakeToEdit = YES; to my application:didFinishLaunchingWithOptions:, and - (BOOL)canBecomeFir...

Motionevent.getX and getY

I need help understanding the following. Say I have a display that is 854x480 pixels. Why is it that the MotionEvent.getX and getY methods return floats? As far as I can tell, the pixels on the display are discrete integers, there is no such thing as a half a pixel on the display. ...

Fluctuation of Yaw in Core Motion

From the code below, I am having a problem with Core Motion that I could not get a reliable yaw data. To reproduce the problem on iPhone 4, you can put the phone on a table, run the code and rotate the phone about the vertical axis between 2 points. On my phone, the yaw value of the points tends to move away from the initial values. For ...

[Android 2.1] MotionEvent multiple touch events get mixed up and influence each other (see demo video)

Hi all, Purpose of the app: A simple app that draws a circle for every touch recognised on the screen and follows the touch events. On a 'high pressure reading' getPressure (int pointerIndex) the colour of the circle will change and the radius will increase. Additionally the touch ID with getPointerId (int pointerIndex), x- and y-coord...

How to convert quaternion to angle?

Is there a formula to convert a quaternion to an angle? Looking to do something on the iPhone using the Core Motion API and the gyro so that based on data I receive from it (in the form of quaternions) I can project a UIView on the screen. Thanks ...

Detect Motion on axis in android

HI, I am willing to implement a logic in which i need to know about the amount of motion made by phone on x y or z axis, using accelerometer i can only find acceleration on these axis, even if i try calculating the relative x coordinate value based on acceleration on x axis, its of no use as i cannot determine the direction of motion (i....

Push method for core motion and frequency of Accelerometer/Gyroscope Data

When push method is used to get accelerometer/gyroscope/device motion data, unfortunately the gyroscope and the device motion maximum frequency cannot exceed 72Hz on average (in fact the data is not periodic at all either). Even worse, if only the gyroscope data is recorded (without starting device motion update service: i.e. using only...

How can you track motion using the iPhone's camera?

I saw that someone has made an app that tracks your feet using the camera, so that you can kick a virtual football on your iPhone screen. How could you do something like this? Does anyone know of any code examples or other information about using the iPhone camera for detecting objects and tracking them? ...

Everything showing up black in project (Apple Motion)

So I just installed Final Cut Studio. I opened Motion and start drawing objects and adding text and importing psd files and everything shows up black. The objects are all there but nothing showing up. Here's a screenshot: http://cl.ly/2qh0 Any help would be fantastic. Thanks! ...

Accelerometer to relative position

Before I reinvent the wheel I wanted to see if anyone can share code or tips for the following: In order to get relative position of the iPhone, one needs to Set the accelerometer read rate Noise filter the accelerometer response Convert it to a vector Low pass filter the vector to find gravity Subtract gravity from the raw reading to...