Vector Rotation (Derivation & Geometric Proof)

Поділитися
Вставка
  • Опубліковано 10 жов 2021
  • Most game programmers know that we can use a matrix to rotate a vector around the origin.
    They also probably know that a vanilla rotation matrix looks something like this:
    [ cosθ -sinθ ]
    [ sinθ cosθ ]
    But, do you want to understand where these formulas come from?
    In this video, we'll learn how to derive the formulas for vector rotation in 2D, including the mathematical geometrical proof of how to find the new rotated values of x and y.
    I hope you enjoy it! :)
    For comprehensive courses on computer science, programming, and mathematics, visit: www.Pikuma.com.
    Don't forget to subscribe to receive updates and news about new courses and tutorials:
    / @pikuma
    Enjoy!
  • Наука та технологія

КОМЕНТАРІ • 39

  • @samuelgibson780
    @samuelgibson780 8 місяців тому +3

    This kind of thing is why the internet is awesome. I've never taken a trig class, and these kinds of quick overviews are priceless

  • @gcpezzi
    @gcpezzi 2 роки тому +17

    Remember that a rotation matrix is basically the same as that initial formula you see in the slides. :)

  • @mrsajjad30
    @mrsajjad30 Рік тому +11

    I can feel the amount of effort and hard work you have put in making this explainer video just to make it so simple for us. Thank you so much Sir. I really appreciate it. I am making a top down tank game and I wanted to implement the rotation logic myself that brought me to your channel. Thank you Sir!

    • @pikuma
      @pikuma  Рік тому +1

      That's very kind. Thank you. :)

  • @azaxmaj2629
    @azaxmaj2629 Рік тому +2

    Great explanation. Helped a lot. All the best for future similar topics. We will be waiting. Thank you .

  • @danilaushamburg2975
    @danilaushamburg2975 Рік тому +3

    This is the best explanation of rotation matrix I ever saw, for sure :)

  • @giggles8593
    @giggles8593 2 роки тому +3

    Thank you for this invaluable information!

  • @kooroshtorabi8773
    @kooroshtorabi8773 9 місяців тому

    Thank you so much! All of your videos are PERFECT.

  • @Lord_Biyoma
    @Lord_Biyoma Рік тому +1

    great and complete explanation thank you !

  • @MrKlaygomes
    @MrKlaygomes Рік тому +1

    Parabéns! Excelente material!

  • @archaicmagnongaming3796
    @archaicmagnongaming3796 9 місяців тому +1

    Finally I found a video that don't use cos(A+B) and sin(A+B) formula

  • @rodolfoc.nascimento6301
    @rodolfoc.nascimento6301 Рік тому +1

    Wow what a amazing explanation!

  • @samhighfield
    @samhighfield 3 місяці тому

    This is by far the best explanation of vector rotation I have ever found. Most books and people just gloss over the derivation of this and frustratingly just accept the formula to be the truth, not even mentioning the great lengths that go into creating these short, simple formulas. Thank you so much!!

  • @contentprogramming
    @contentprogramming 2 роки тому +3

    good work , i love it

  • @eduardomacedo2504
    @eduardomacedo2504 Рік тому

    Thank you for the great video!

  • @lksxxtodin5292
    @lksxxtodin5292 9 місяців тому +1

    Thanks!!! ❤

  • @katsusanw-game-ch
    @katsusanw-game-ch 8 місяців тому +1

    Your description is so easy to know.😀

  • @hapboyman
    @hapboyman 2 місяці тому +1

    This is an excellent explanation, Gustavo. However, I know a more straightforward approach. I studied it on the Brilliant online school, on a Vector course.
    You need to cut out of paper a right triangle whose hypotenuse is the length of the initial vector and the legs are its components. Then attach it to the graph and rotate it and everything will become clear.

  • @EgorChebotarev
    @EgorChebotarev 5 місяців тому

    interesting and accurate explanation

  • @carljeffersondelfin4210
    @carljeffersondelfin4210 Рік тому +2

    you deserve more views!

  • @dandnnn
    @dandnnn 10 місяців тому

    Great video!

  • @leeoiou7295
    @leeoiou7295 2 роки тому +2

    Very useful video

  • @maxgin3728
    @maxgin3728 4 місяці тому

    thank you so math, very useful🙂

  • @mohokhachai
    @mohokhachai 8 місяців тому

    Good tuts

  • @japhethjay4880
    @japhethjay4880 2 роки тому +2

    Thanks so much for the video

    • @japhethjay4880
      @japhethjay4880 2 роки тому

      I need to get into game dev at some point

  • @tjalferes
    @tjalferes Рік тому +1

    Thank you.

  • @slca
    @slca 10 днів тому

    Thanks 🙏

  • @sic111
    @sic111 Місяць тому

    very cool video

  • @alexandern9353
    @alexandern9353 5 місяців тому

    what is D a projection of? like I don't see where its y-coordinate came from, it's neither y nor y'

  • @khaledx4964
    @khaledx4964 Рік тому +1

    you show us the truth that vector rotation is simple👌👌👌👌👌
    Don’t forget me when you get famous

  • @xKeray
    @xKeray Рік тому +1

    quaternions next?

  • @tecnolog7933
    @tecnolog7933 Рік тому

    As I could understand, if I use the formula I mot only rotate, but I move the vector or I can use this formula to rotate, but keep the position in cartesian plane.
    Also, grade A content, really cool.

    • @pikuma
      @pikuma  Рік тому +1

      The rotstion assumes that the pivot point is always the origin (0,0). If you want to translate (move the vector around) you should do that after the rotation.

    • @tecnolog7933
      @tecnolog7933 Рік тому +1

      @@pikuma Thanks, i was with this question because the dots are away from origin.

  • @joachimschmidt7662
    @joachimschmidt7662 Рік тому +1

    Every sub is hard won. Here, take mine :-)
    Very good lecturer.

  • @mr.chindo8570
    @mr.chindo8570 10 місяців тому

    how to write in terms of beta

  • @ian.ambrose
    @ian.ambrose Рік тому

    I appreciate the explanation but that derivation seriously is so long. There's a 5 minutes long derivation by Pen and Paper Science but with the same mathematical approach.

    • @pikuma
      @pikuma  Рік тому

      Hi Ian. There are many ways of deriving the rotation components. I believe the most common one out there is the one where people rotate both axis keeping 90° between them and projecting their cosine and sine. I tried to add the actual geometrical *proof* of the problem, hence the length of the video.