Jump to content
  • Advertisement

alvaro

Member
  • Content Count

    7978
  • Joined

  • Last visited

  • Days Won

    4

alvaro last won the day on October 13

alvaro had the most liked content!

Community Reputation

21399 Excellent

4 Followers

About alvaro

Personal Information

  • Role
    Programmer
  • Interests
    Programming

Recent Profile Visitors

43865 profile views
  1. I just want to point out that you don't need to use angles for this (or for pretty much anything else). Assuming you are using quaternions to represent attitudes, you can compute the rotation that would bring your current attitude to your desired attitude with one division. The logarithm of this quaternion will give you the angular velocity that you would have to apply for one unit of time to get where you want. That's the P term in your PID controller. The D term is your current angular velocity. I can think of a couple of ways of implementing the I term, but you can start without it and think about it later. I can put together some sample code for this PID controller if you are having a hard time. Just ask. There is also a dynamic-programming approach to optimal control theory which would be interesting to apply to this problem, but that's more involved.
  2. Figuring out the angular impulse to reach some target orientation is the angular equivalent of figuring out the linear impulse to reach some target position. It basically makes no sense. You have to decide how quickly you want to get there, as pcmaster pointed out.
  3. alvaro

    Quaternions, how does ki = j?

    You still haven't given me the list of axioms you are starting with, and without that I can't even start to help you.
  4. alvaro

    Quaternions, how does ki = j?

    I've always thought of quaternions with all those identities to begin with, but there's probably a shorter list of properties from which all of these can be deduced. I imagine that's what you are trying to do. That's why I was asking what axioms you are starting from.
  5. While you are at it, instead of vague descriptions of the results you are getting, post pictures of what you get and --to the extent you can-- what you would like to get.
  6. alvaro

    Quaternions, how does ki = j?

    I'm not sure what axioms you are assuming in your computations. In other words, I don't know which known identities you are using to try to deduce other things. To me the basic identities are: i2 = j2 = k2 = -1 ij = -ji = k jk = -kj = i ki = -ik = j You can easily compute anything with those. You seem to start with ijk=-1, which is true, but I had to do (ij)k = k2 = -1 in my head to verify it. To go from j(ijk) to -ij2k, I simply swap the order of the first "ji" to "ij", which makes the sign flip: j(ijk) = (ji)jk = -(ij)jk = -ij2k Alternatively, just compute both sides and verify they are -j.
  7. alvaro

    "Nice" tweakable S-function

    Try this: 1/(1+exp(-s*(-log(1/x-1)))) s=1 is the identity. As s grows, the function converges to the step function, as you wanted. Values of s between 0 and 1 are also possible, and behave reasonably. EDIT: Oh, I think my function is actually the same as x^s/(x^s+(1-x)^s), which is what Zakwayda pointed to: http://www.wolframalpha.com/input/?i=simplify+1%2F(1%2Bexp(s*ln(1%2Fx-1)))-x^s%2F(x^s%2B(1-x)^s),+assuming+s>1+and+0<x<1
  8. He did post this information, and it is 8bpp: m_pDevice->CreateTexture(64, 64, 1, D3DUSAGE_DYNAMIC, D3DFMT_L8, D3DPOOL_DEFAULT, &sightTexture, NULL);
  9. I don't see enough code here. How many bytes per pixel are you using?
  10. alvaro

    Bi-coloring mathematical programming problem

    This is easy? I am very good at this kind of thing and I didn't think it was all that easy. I mean, I knew how to approach it right away because I am familiar with the much-harder problem of counting legal positions in go. But if I hadn't know that, I think I would have had a hard time. Did you notice n can be up to 1000?
  11. alvaro

    Bi-coloring mathematical programming problem

    Fun with polynomials! If n=3 and k=4, compute the following polynomial: https://www.wolframalpha.com/input/?i=Expand+[[1,1,1,1]]+*+[[1,1,1,x],[x,1,x^2,x],[x,x^2,1,x],[x,1,1,1]]^(3-1)+*+[[x],[x^2],[x^2],[x]] The coefficient of x^4 is the answer. Actually, I can't think of any other way to solve this problem.
  12. alvaro

    Bi-coloring mathematical programming problem

    There is a definition of "component" in the link you gave us. It's some sort of inductive definition, and those are hard to get used to. In this case, the definition might not even be correct. There are other ways to define the same concept. Two cells are in the same component if and only if you can reach from one to the other stepping only between neighbors. EDIT: That was an interesting problem. Too bad the link is now broken. Is it available anywhere else?
  13. The cross product of (1,0,0) and (0,1,0) is (0,0,1) no matter what handedness you are using. Handedness only enters when you assign (1,0,0) the meaning of "to the right of the screen", (0,1,0) the meaning of "upwards along the screen" and (0,0,1) the meaning of "perpendicular to the screen away from the viewer", for example. Now in order to determine the sign of rotations and the sign of the cross product you can use a hand, and you'll find out whether this is a left-handed system or a right-handed system.
  14. What makes the system left-handed is your interpretation of what the x, y, and z coordinates mean when you visualize the vectors. The arithmetic is independent of handedness, so there is nothing in the library that depends on it.
  15. Oh, the way I think about it I would say that B has a virtual destructor even if you didn't write one. So I believe we agree.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!