# Moving Circle with respect to a point

This topic is 5162 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a circle and a point. The point may exist inside or outside circle. All i want is to move the circle "upwards" so that the point lies in the lower half at radius/circumferece. Of course this is only possible if point is inside vertical boundings of circle. I dont want to implement an iterative method like simply moving circle upwards until point lies on its circum.

##### Share on other sites
Easy way: fix a point in the lower part of the circle, then find the vector between that point and your other point, then translate along the vector.

How to fix a point? why not just pick one halfway down the lowest radius.

##### Share on other sites
You didnt understand my requirements. Let me show an image.

See part A:
dots legend.
Blue: Center of circle.
Red: the point inside circle.
Yellow: vertical projection of red dot on circle boundry.

I want to know the distance between red and yellow dots. So I can multiply it with UNIT_Y unit vector to move circle upward. And red dots will be at boundry, 2 red dot examples are shown in image.

##### Share on other sites
Wouldnt the translation vector just be the difference of the vectors (blue2yellow) and (blue2red)?

##### Share on other sites
Im not sure if you can do it non-numerically unless you define the translation to be restricted to an x or y direction. Maybe im just not that good at linear algebra but here is what I have:
Vector r = vector from circle center to final position on edge
Vector u = vector of translation
Vector w = original vector from center of circle to previous position

We can see if we draw a diagram that
r = w + u
lets call magintudes of u, Ux and Uy, in i and j directions
so
u = Uxi + Uyj (unit vector)
M = magnitude of translation, Mu
w = Wxi + Wyj
r = w + Mu = (Wx+MUx)i+(Wy+MUy)j
we know that the magnitude of r is the radius of the circle, which i assume is known as "R" so
|r| = R = sqrt((Wx+MUx)^2 + (Wy+MUy)^2)
square each side, and multiply our the RHS

R^2 = Wx^2 +2WxMUx + (MUx)^2 + Wy^2 +2WyMUy + (MUy)^2

Now we know R, Wx, Wy, Ux, and Uy. Just solve for M.

##### Share on other sites
IGNORE THE PREVIOUS POST. For some reason it wont let me edit. Here is the corrected bersion.

Vector r = vector from circle center to final position on edge
Vector u = unit vector of translation
Scalar M = MAgnitude of translation along u
Vector w = original vector from center of circle to previous position

We can see if we draw a diagram that
r = w + Mu
lets call magintudes of u, Ux and Uy, in i and j directions
so
u = Uxi + Uyj (unit vector)
M = magnitude of translation, Mu
w = Wxi + Wyj
r = w + Mu = (Wx+MUx)i+(Wy+MUy)j
we know that the magnitude of r is the radius of the circle, which i assume is known as "R" so
|r| = R = sqrt((Wx+MUx)^2 + (Wy+MUy)^2)
square each side, and multiply our the RHS

R^2 = Wx^2 +2WxMUx + (MUx)^2 + Wy^2 +2WyMUy + (MUy)^2

Now we know R, Wx, Wy, Ux, and Uy. Just solve for M.

##### Share on other sites
Thanx for the help, I knew Ux always will be = 0 and and Uy will be = 1.
and -(Wx^2+Wy^2) will be = |W|^2.

So it simplfies to
R^2 - W^2 = + 2WyM + M^2
let t = (R^2 - W^2)
let p = 2Wy

So finally
M^2 + pM - t = 0

Solving for M.... It worked. Thanx again, I was trying to solve this problem using trignometry.

1. 1
Rutin
33
2. 2
3. 3
4. 4
5. 5

• 13
• 76
• 11
• 10
• 14
• ### Forum Statistics

• Total Topics
632968
• Total Posts
3009584
• ### Who's Online (See full list)

There are no registered users currently online

×