I have two vectors: one is in the center of the circle, the other is in the mouse position. I want to find a point on a circle that is between two vectors.
I specifically want to answer in terms of the center of the circle + diameter, not trigonometry. So, the center of the circle + the diameter of the circle (in the direction) of the mouse position.
If that helps, think about a watch. I need vectorial coordination of the "number" that the "hand" points to. The hand always points to a variable vector "mouse position".
I want a “point” (vec2d_X) on the circle between the “center of the clock” (vec2d_1) and the “mouse position” (vec2d_2).
See also the following question:
Determine the direction of rotation / direction / variable point on the circle
EDIT → → →
Is a trigger used faster?
def circlepoint_trig(vertex, mousepos, circlepoint):
angle = math.atan2(mousepos[1] - vertex[1], mousepos[0] - vertex[0])
myx = 80 * math.cos(angle) #80 is length of clock 'hand'
myy = 80 * math.sin(angle) #80 is length of clock 'hand'
circlepoint = vec2d(myx,myy) + vertex
return circlepoint
source
share