-1

I've managed to understand how to project 3d point to 2d screen.

Now, I would like to ask some guidelines on how to integrate phone rotation according to accelerometar data to change marker's screen coordinate.

karthik
  • 17,453
  • 70
  • 78
  • 122
Quirik
  • 141
  • 2
  • I've been doing a lot of reading and searching for my answer. I think that projection matrices would do the trick? Correct me if I'am wrong. – Quirik Jan 03 '12 at 14:46
  • It feels like you expect this community to write all the code for you from scratch. If you want to prevent that your question is closed you have to provide some code that shows your effort so far. That would alsdo help to determine for what platform/device you need this to work. – rene Jan 03 '12 at 14:50
  • I do not want that someone writes the code for me. I apologize for giving that impression. I will develope for Android and by that I mean that at the moment I'm doing all the math part and calculations on paper until I find the proper solution. As I said, I think that projection matrices are my solution, but I'm having problems understanding how exactly they work and asking for basic and plain explanations on that subject, not someone to write my code. Again, all apologies. – Quirik Jan 03 '12 at 15:08
  • @rene Ivan's question is a valid, good question, and the answer is non-trivial. He did not ask us to write his code. – Ali Jan 03 '12 at 15:13
  • OK, I'll do +1 then once SO let me. – rene Jan 03 '12 at 15:25
  • I repeat: **this is valid question with a non-trivial answer.** If you do not like it then try to improve it instead of silently downvoting. – Ali Jan 03 '12 at 16:23

1 Answers1

0

You need the gyro data, not the accelerometer data.

The gyro mouse might work for your application, see between 37:00-38:25 in the Google Tech Talk.

If you need more than the gyro mouse then I highly recommend Direction Cosine Matrix IMU: Theory, it is basically a tutorial on how to implement orientation tracking.

Similar questions:

track small movements of iphone with no GPS
What is the real world accuracy of phone accelerometers when used for positioning?
how to calculate phone's movement in the vertical direction from rest?
iOS: Movement Precision in 3D Space
How to use Accelerometer to measure distance for Android Application Development
How can I find distance traveled with a gyroscope and accelerometer?

Community
  • 1
  • 1
Ali
  • 56,466
  • 29
  • 168
  • 265
  • I really appreciate your help. Thanks a lot. I would also like to understand how projection matrices works but did not managed to find any tutorial that explains it in a simple way with some example. Can you recommend any useful links on that subjects? – Quirik Jan 03 '12 at 15:44
  • @Ivan First of all, I am sorry that others are downvoting your question. Do not get discouraged. As for projection matrices: try using the gyro mouse, really 1 line of code, you do not need any matrices. If you insist on the projection matrices then you will have to explain me in detail what you are trying to do. In my opinion the gyro mouse is exactly what you are looking for. – Ali Jan 03 '12 at 16:28
  • Thanks for your support. Some things are still blurry regarding 3d point to 2d projection. How does this works: [link] (http://en.wikipedia.org/wiki/3D_projection#Perspective_projection)? What is the difference in way of work, '+' and '-' between that and this [link] (http://stackoverflow.com/questions/5314724/get-screen-coordinates-by-specific-location-and-longitude-android)? – Quirik Jan 03 '12 at 16:52
  • Neither of these apply to the situation you describe in your question. What you write in your question can be solved with the gyro mouse and projection is not needed. Please watch the the gyro mouse in the video. If it is not what you need then ask another question and explain in details what you are looking for. – Ali Jan 03 '12 at 17:22