Recent content by Snark1994

  1. S

    Object Dropped From 500m: Solved with Differential Equations

    Okay, so what equations has your lecturer given you that might relate to this problem?
  2. S

    Can't Seem to Solve Alpha: Find the Limit

    Just divide top and bottom by n. Then the limit of the numerator is 1, while the limit of the denominator is 2i (the \frac{(-1)^n}{n} has magnitude which tends to 0).
  3. S

    Changes in velocity with Direction change

    If you include the information about what your axes are (i.e. South = (0,1), West = (1,0) ) then when you write the components of \Delta v down you have represented it unambiguously. You shouldn't need to include it unless the question specifically asks you for it. I'm not sure I understand...
  4. S

    Changes in velocity with Direction change

    You have to remember that velocity is a vector: so we have v_1 = (0,6.4) and v_2 = (5.8,0) (where (1,0) points West and (0,1) points South), so as you correctly wrote: \Delta v = v_2 - v_1 = (5.8, -6.4). This is technically the change in his velocity, but the question may be just asking for its...
  5. S

    Is Sin^2(a) Equal to Sin^2(b) + Sin^2(c) Only in a Right Triangle at A?

    Transforming \sin^2 a will help you. In fact, the easiest way I can see of proving the result from right-to-left (remember for an "if and only if" you need to prove it both ways) is to show that \sin^2 a = k = \sin^2 b + \sin^2 c for some specific number k whose value you'll have to work out...
  6. S

    Is Sin^2(a) Equal to Sin^2(b) + Sin^2(c) Only in a Right Triangle at A?

    Well, a+b+c = \pi is going to be true of all triangles, so that's not necessarily going to be much help. What does ABC being a right-angled triangle in A imply for the value of a? What does that imply for the value of b+c? What does that imply for the value of \sin^2 a?
  7. S

    Why does some key pair for RSA return same value

    What convention are you using? The only one I've seen is (encoding exponent, modulus), but 2^5 \equiv 4 \pmod 7 and 2^7 \equiv 3 \pmod 5, so I presume I have misunderstood your question. Can you give a more specific example?
  8. S

    C/C++ How Can I Implement Big Int Functionality in C++ for Project Euler Problems?

    I wouldn't use C strings - I would use the std::deque template (http://www.cplusplus.com/reference/deque/deque/), or maybe std::vector, depending on your exact implementation. Conversion to hexadecimal wouldn't make a lot of sense unless you were really worried about space, and trying to fit...
  9. S

    AI optimal rotation of a rigid body

    Well, I haven't got C++ working but my python seems to be working well enough - using the seek/arrive steering behaviour I posted in my last post: #!/usr/bin/env python3 from math import sqrt,sin,cos,acos rot_thrust = 0.01 #degrees per timestep DEGTORAD = 0.0174532 def main()...
  10. S

    AI optimal rotation of a rigid body

    Thanks, I understand that a non-linear parameter will give the appearance of an accel/decel rotation, but that's more applicable to animation. I also can't see how it would cope with the case where e.g. the ship is at (Y,P,R) = (90,0,0), wants to get to (0,90,0) and is initially rotating around...
  11. S

    AI optimal rotation of a rigid body

    Sorry, could you give me a pseudo-code example? I'm pretty sure that it doesn't work your way, but I might be wrong. Just to make sure, you're creating a SLERP_magic function that satisfies: function SLERP_magic(current_rot,current_drot,target_rot){ //do stuff, return a value for d2pos...
  12. S

    AI optimal rotation of a rigid body

    SLERP would still be going down the animation route, wouldn't it? It's just a smooth interpolation between the two quaternions, not an acceleration/deceleration...
  13. S

    AI optimal rotation of a rigid body

    Not really, I just find quaternions more intuitive... I can visualise what's going on with quaternions better than with matrices, and as the two are isomorphic (i.e. if you can implement something with matrices, then you can implement it with no changes to the fundamental algorithm with...
  14. S

    AI optimal rotation of a rigid body

    Aha, yeah, you've got it! (I don't think your approach would quite work, because Euler angles aren't independent of each other - if you roll right 45° and then yaw left 90°, that's the same as yawing left 90° and then pitching up 45° - but it seems to work alright with quaternions) Now, that...
  15. S

    AI optimal rotation of a rigid body

    Aha, we're getting closer... It is a maths question, but I suspected it might be difficult to solve the problem analytically - so I suspect a more crude programming solution is probably the best way to solve the problem for the purposes of the game. My problem is not how to animate the motion...
Back
Top