Results 1 to 3 of 3

Math Help - point on grid along a circle's edge?

  1. #1
    Newbie
    Joined
    Sep 2009
    Posts
    2

    Question point on grid along a circle's edge?

    I'm sorry, I don't even know what this is called so if it is in the wrong subforum, I apologize again. While I am asking for the work to be done for me, I'm not just some dumb kid (I'm 28) so either an answer or simply point me in the right direction would also be ok.

    I'm trying to make a boat with independantly rotating turrets mounted to it. I need those turrets to stay in the same spot on the hull regardless of the direction the boat is facing. This is for a system that only uses (x,y) coordinates, and basic mathematics (+,-,x,\).

    As you can see the boat's rotation point is currently (8.0,8.0) and the turret is at (9.0,8.0). As the boat turns that point will move and I would like to know at each frame it's current location on the grid. Like if the boat rotated 12 degrees counter-clockwise, where will the turret end up? (This coord will then be used to position the turret manually)

    - Mike
    Attached Thumbnails Attached Thumbnails point on grid along a circle's edge?-boat_turret.png  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member pflo's Avatar
    Joined
    Apr 2009
    From
    Albuquerque, NM
    Posts
    155
    Thanks
    7
    Quote Originally Posted by Mikemc View Post
    I'm trying to make a boat with independantly rotating turrets mounted to it. I need those turrets to stay in the same spot on the hull regardless of the direction the boat is facing. This is for a system that only uses (x,y) coordinates, and basic mathematics (+,-,x,\).

    As you can see the boat's rotation point is currently (8.0,8.0) and the turret is at (9.0,8.0). As the boat turns that point will move and I would like to know at each frame it's current location on the grid. Like if the boat rotated 12 degrees counter-clockwise, where will the turret end up? (This coord will then be used to position the turret manually)
    The y-coordinate is the sine of the angle (plus 8 since the circle's origin is at y=8) and the x-coordinate is the cosine of the angle (plus 8 since the circle's origin is at x=8). If the radius of your circle were something other than 1, you would need to multiply the sine and cosine times the radius before doing the addition.

    Note that this is when the angle is measured in a counterclockwise direction, so a movement in the clockwise direction would be a negative angle. Also, make sure you're using the correct units when doing this (degree mode, all length units the same, etc).

    This should work no matter which direction the boat is facing - even travelling backwards.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Sep 2009
    Posts
    2
    Ah.. so if the boat is at say, (76,55) and is rotated +24 degrees, then the turret should be at ~(76.9,55.4) and +48 degrees is ~(76.6,55.7).

    ...cool!

    Thanks a ton! Now I just need to figure out how to use only whole numbers but that'll be my doing

    - Mike
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Point on Circle Closest to Another Point on Circle
    Posted in the Geometry Forum
    Replies: 8
    Last Post: September 20th 2011, 05:21 AM
  2. How to parametrize the edge of a circle?
    Posted in the Calculus Forum
    Replies: 1
    Last Post: August 10th 2011, 11:52 AM
  3. Replies: 12
    Last Post: September 24th 2010, 11:10 AM
  4. Replies: 2
    Last Post: July 23rd 2010, 03:42 AM
  5. find an edge point of ellipse
    Posted in the Math Software Forum
    Replies: 5
    Last Post: April 11th 2010, 06:25 AM

Search Tags


/mathhelpforum @mathhelpforum