I am working on an iPhone app and I am trying to do something that addresses line-circle collision Have to do with applying. I am using the slope of the line and check whether the coordinates of a circle meet the equation y = mx + b, but there is a pain to get the slope with the current basic (0,0) on the top left . Either way, I can convert coordinates so that the core is at the center of the screen.
The actual origin is 200,200 in the screen coordinates. Why not only reduce your 200,200 points before computing? You do your calculations again as the original 0,0 is not going to change in the slope. There is a lot of power for trigonometry in the BTW iPhone, I have made a point intersection in a circle by comparing the distance from one point to the middle point with the known radius of the circle. You can use a tangent with the same slope from the line that you want to check to find the intersection of the line taken from the midpoint and compare the radius by the length. Everything is in CGflots and anyway I can not even slow down to 3G.
Comments
Post a Comment