Results 1 to 15 of 15

Thread: Rotation Equation

  1. #1

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327

    Rotation Equation

    Does anyone know a formula to rotate as whole around (0,0) by using these values? And have a formular to find each new point?
    Attached Images Attached Images  
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  2. #2
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771
    I don't understand your image. What do you want to know, and what information do you have. It is probably easier to understand if you write it down.

  3. #3

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327
    Think of it as a car, the center of rotation is the center of the car, the diameter is the total width of the car, the antenea on the left-hand side is the unknown point, and the antenea to the object distance is unknown. But you do know how far the antenea is from the center of the car AND the distance it is from the perpandicularly of the invisible diameter.


    Look here on "Rotation"

    http://www.inversereality.org/tutori...ormations.html
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  4. #4
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771
    (Look at the attachment)
    So, given x,y,a and thereby the three black points, you want to calculate the length of the segment indicated with a question mark. This is simply the diagonal of a triangle, and you can calculate it using Pythagoras's Theorem:
    ?2 = x2 + (y-b)2

  5. #5

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327
    Uhhh... no, not only that, but fill in all the ? marks and a formula to fill them in when rotated as a whole object around (0,0).
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


  6. #6
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    One: Figure out the distance between the point and 0,0.
    Two: Figure out the angle.
    Three: The new point is at angle+rotation (at the calculated distance away from 0,0)
    Don't pay attention to this signature, it's contradictory.

  7. #7
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Isn't it easier to use a rotaion matrix?

  8. #8
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    Well I don't know what a rottion matrix is... can they be done by hand?
    Don't pay attention to this signature, it's contradictory.

  9. #9
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Yeah they can be done by hand....I am not sure how a 2D rotation matrix would look like, but you will probably find it using google.

    BTW what are you going to use this for. Is it a game or an assigment or what?

  10. #10
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    More or less on the middle of this page you can see a 2D roation matrix:


    http://www.dai.ed.ac.uk/CVonline/LOC...MAT/node4.html

  11. #11
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    well you need a calculator so you can do the trigs, other than that its simple linear algebra
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  12. #12
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    nah you don't need that knowing r' and h in the figure
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  13. #13
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Originally posted by kedaman
    well you need a calculator so you can do the trigs, other than that its simple linear algebra

    CAn't you do simple sin and cos in your head...you are getting dum becuase of all the Functional Programming ****...

  14. #14
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    no note, the right tool for the right job, right?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  15. #15

    Thread Starter
    Hyperactive Member Q_Me's Avatar
    Join Date
    Dec 2001
    Posts
    327
    It's for a game. Can't do a matrix, don't know how to do a matrix, and don't want to do a matrix. Put it at that.

    I'm trying to do a 2D engine in visual basic, and please do not recomend using it from a 3rd-party. I'm just programming what I need and not anything else.

    But if all else fails, I might consider using DaBooda 2D.
    53323737 15 743 313402 05 740313063. 17 15 4150 743 313402 05 140393403437 5203 743 30210.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width