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?
Printable View
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?
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.
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
(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
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).
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)
Isn't it easier to use a rotaion matrix?
Well I don't know what a rottion matrix is... can they be done by hand?
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?
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
well you need a calculator so you can do the trigs, other than that its simple linear algebra
nah you don't need that knowing r' and h in the figure :afrog:
Quote:
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 ****...:D
no note, the right tool for the right job, right? :D
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. :p
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. :(