Results 1 to 9 of 9

Math Help - How can you find the midpoint between two random points on a circle?

  1. #1
    Newbie
    Joined
    Jul 2010
    Posts
    5

    How can you find the midpoint between two random points on a circle?

    Hey people! The question is basically in the title. Say you have two points on your standard circle, point 1: (x,y,z) and point 2: (u,v,c). (***This is meant to be used in a 3D dimensional space.).

    I want to basically be able to place these two points anywhere on said circle (anywhere except both in the same spot) and derive the center between these two points, all the while keeping this midpoint on the circle as well.

    Theoretically, since the midpoint lays on the circle and isn't linear, there are two "midpoints," one closer and the other further away in comparison. Thankfully, this problem would only arise in circles whose sweep goes past 180 degrees (a semi circle). I'm only dealing with arches up to 90 degrees so I only have to worry about the short midpoint.


    So graphically, there's what I'm talking about:

    CGSociety Stuff :: Arch Question Diagram picture by Korinkite - Photobucket

    In this picture, the two yellow dots represent the two random points on the circle that I picked and the red is the shorthand midpoint. The long midpoint that I mentioned before, the one that I can effectively negate since I only work with arches of 90 degrees (or pi/2 jeez don't correct me), is signified with a good old green X over the green dot.

    So back to the main question. In this setup that I have described above, a standard circle in a 3D space, is there a formula that I can use to find the "midpoint" between two random points of the circle?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,830
    Thanks
    123
    Quote Originally Posted by Korinkite View Post
    Hey people! The question is basically in the title. Say you have two points on your standard circle, point 1: (x,y,z) and point 2: (u,v,c). (***This is meant to be used in a 3D dimensional space.).

    I want to basically be able to place these two points anywhere on said circle (anywhere except both in the same spot) and derive the center between these two points, all the while keeping this midpoint on the circle as well.

    Theoretically, since the midpoint lays on the circle and isn't linear, there are two "midpoints," one closer and the other further away in comparison. Thankfully, this problem would only arise in circles whose sweep goes past 180 degrees (a semi circle). I'm only dealing with arches up to 90 degrees so I only have to worry about the short midpoint.


    So graphically, there's what I'm talking about:

    CGSociety Stuff :: Arch Question Diagram picture by Korinkite - Photobucket

    ...
    1. In 2-D-space the "midpoint" is the intersection point of the perpendicular bisector of the 2 given points and the circle.

    2. In 3-D-space you have to use a plane which is perpendicular to the line segment between the 2 given points and passing through the midpoint of this line segment. The "midpoint" is then the intersection between the circle and this plane.

    3. To my knowledge there doesn't exist a simple formula which yields the coordinates of this "midpoint".
    Follow Math Help Forum on Facebook and Google+

  3. #3
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    You can solve this by using matrices of rotation. Define O to be the center of the circle, and A and B are the two randomly chosen points on the circle. Define \theta to be the angle in the interval [0,\pi] between the two vectors OA and OB. Then the midpoint M would be the tip of the vector obtained by rotating OA to OB through an angle of \theta/2.

    Here is a page that describes rotations about an arbitrary axis. Your result isn't going to be pretty, but I think you can get a general equation for the desired point.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Jul 2010
    Posts
    5
    Hey people! Thank you for your replies!

    In the end, I decided to go with a version of Ackbeet's reply. I found that the math to find the angle between two point vectors (with the center of the circle being the midpoint), although admittedly something I could do with Autodesk Maya's MEL script....:

    global proc MeasureAngle ()
    {

    float $firstPointLocation [] = `pointPosition protractor1.cv[0]`;
    print $firstPointLocation;

    float $secondPointLocation [] = `pointPosition protractor1.cv[1]`;
    print $secondPointLocation;

    float $thirdPointLocation [] = `pointPosition protractor1.cv[2]`;
    print $thirdPointLocation;

    vector $vectorBA = <<1,1,1>>;
    vector $vectorBC = <<1,1,1>>;

    float $firstPointX = $firstPointLocation[0];
    float $firstPointY = $firstPointLocation[1];
    float $firstPointZ = $firstPointLocation[2];

    float $secondPointX = $secondPointLocation[0];
    float $secondPointY = $secondPointLocation[1];
    float $secondPointZ = $secondPointLocation[2];

    float $thirdPointX = $thirdPointLocation[0];
    float $thirdPointY = $thirdPointLocation[1];
    float $thirdPointZ = $thirdPointLocation[2];


    float $vectorBAX = ($secondPointX - $firstPointX);
    float $vectorBAY = ($secondPointY - $firstPointY);
    float $vectorBAZ = ($secondPointZ - $firstPointZ);

    $vectorBA = << $vectorBAX, $vectorBAY, $vectorBAZ>>;

    float $vectorBCX = ($secondPointX - $thirdPointX);
    float $vectorBCY = ($secondPointY - $thirdPointY);
    float $vectorBCZ = ($secondPointZ - $thirdPointZ);

    $vectorBC = << $vectorBCX, $vectorBCY, $vectorBCZ>>;


    float $finalAngle = rad_to_deg (`angle $vectorBA $vectorBC`);
    float $otherAngle = (180-$finalAngle);
    print "\n";
    print $finalAngle;

    text -e -label $finalAngle angleText;
    text -e -label $otherAngle angle2Text;
    }

    MeasureAngleTool;


    In truth though, I was trying to find ways around this because it is taxing on Maya's expression editor to use code like that so I broke things down using a system of constraints.

    Basically, I made a circle and created two locators (locator A and locator C) that can have their coordinates tracked, both of which are constrained along the circle so they can never leave it. I have a third locator (locator B) in the center of the circle to track the circle's world coordinates. Finally, I have one last locator (locator D) to reference the midpoint between locator's A and C.

    I created a line whose length is directly controlled by the radius of the circle, where one end is constrained to the center of the circle and the other end points to the midpoint locator D. I use the tip of the line segment to track the midpoint between the two points in this way.

    CGSociety Stuff :: Math Forum Circle_Midpoint Solution (?) picture by Korinkite - Photobucket

    I should think this would yield accurate results, and with the use of no expressions too!

    Thank you Ackbeet and earboth for the idea ^_^.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Banned
    Joined
    Oct 2009
    Posts
    769
    Quote Originally Posted by Korinkite View Post
    Hey people! The question is basically in the title. Say you have two points on your standard circle, point 1: (x,y,z) and point 2: (u,v,c). (***This is meant to be used in a 3D dimensional space.).

    I want to basically be able to place these two points anywhere on said circle (anywhere except both in the same spot) and derive the center between these two points, all the while keeping this midpoint on the circle as well.

    Theoretically, since the midpoint lays on the circle and isn't linear, there are two "midpoints," one closer and the other further away in comparison. Thankfully, this problem would only arise in circles whose sweep goes past 180 degrees (a semi circle). I'm only dealing with arches up to 90 degrees so I only have to worry about the short midpoint.


    So graphically, there's what I'm talking about:

    CGSociety Stuff :: Arch Question Diagram picture by Korinkite - Photobucket

    In this picture, the two yellow dots represent the two random points on the circle that I picked and the red is the shorthand midpoint. The long midpoint that I mentioned before, the one that I can effectively negate since I only work with arches of 90 degrees (or pi/2 jeez don't correct me), is signified with a good old green X over the green dot.

    So back to the main question. In this setup that I have described above, a standard circle in a 3D space, is there a formula that I can use to find the "midpoint" between two random points of the circle?
    "I want to basically be able to place these two points anywhere on said circle (anywhere except both in the same spot) and derive the center between these two points, all the while keeping this midpoint on the circle as well." Using your given coordinates, the answer is the following: i = (x+u)/2, j = (y+v)/2, k = (z+c)/2 where (i,j,k) is your midpoint.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Reply to wonderboy:

    Unfortunately, that approach won't work. The midpoint is the midpoint as measured by arcs on the circle. It is not the midpoint of the straight line joining the two randomly chosen points.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jul 2010
    Posts
    5
    Unfortunately no it wouldn't but the midpoint still has a use for my original question.

    If you create a line segment going from the exact middle of the circle and aim it towards the midpoint that wonderboy described, so long as the line segment is always the radius of the circle, the tip of the line should always be the exact middle of the two points measured on the arc of the circle. Done deal :P.

    Still, I'm curious to see if you could transform that process that I described into math using a vector array that takes the two points I mentioned here.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    If you know the coordinates of the center of the circle, that's a perfectly good way to go. How do you think you'd go about doing it using this method?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Korinkite View Post
    Hey people! The question is basically in the title. Say you have two points on your standard circle, point 1: (x,y,z) and point 2: (u,v,c). (***This is meant to be used in a 3D dimensional space.).
    How is your "standard circle" characterised?

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Find the Midpoint Between Two Points
    Posted in the Algebra Forum
    Replies: 3
    Last Post: January 10th 2012, 07:32 AM
  2. Replies: 4
    Last Post: May 2nd 2010, 03:34 PM
  3. find points on a circle
    Posted in the Geometry Forum
    Replies: 1
    Last Post: March 29th 2009, 12:27 PM
  4. N random points in a circle
    Posted in the Advanced Statistics Forum
    Replies: 4
    Last Post: March 20th 2009, 10:00 AM
  5. circle intersection, find points
    Posted in the Pre-Calculus Forum
    Replies: 3
    Last Post: December 12th 2008, 10:57 AM

Search Tags


/mathhelpforum @mathhelpforum