Results 1 to 5 of 5

Math Help - Urgent help in finding out a point on a line

  1. #1
    Newbie
    Joined
    May 2006
    Posts
    6

    Urgent help in finding out a point on a line

    Hi,

    This is my scenario.

    I have a line and I know that it is originating at x1,y1.
    I also know the angle of the line with respect to the base.
    Given a distance from the x1,y1 I need to know the other points x2,y2

    How do I do this.

    can anyone help me with providing a formula say

    x2= so and so
    and
    y2 = so and so

    I've to use this in a computer language and so would be glad if I could get a formula such as the above.

    Please guys help needed.

    Thanks in advance.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,829
    Thanks
    123
    Quote Originally Posted by hari-kj
    Hi,

    This is my scenario.
    I have a line and I know that it is originating at x1,y1.
    I also know the angle of the line with respect to the base.
    Given a distance from the x1,y1 I need to know the other points x2,y2

    How do I do this.
    can anyone help me with providing a formula say
    x2= so and so
    and
    y2 = so and so
    I've to use this in a computer language and so would be glad if I could get a formula such as the above.
    Please guys help needed. Thanks in advance.

    Hello,

    you have the variables x1, y1, x2, y2, distance, angle which are the type real.

    The varaibles x1, y1, distance and angle have got a value by an input procedure. The angle is given in degrees.

    Then
    x2:=x1+distance*cos(pi/180*angle);
    y2:=y1+distance*sin(pi/180*angle);

    OR

    x2:=x1-distance*cos(pi/180*angle);
    y2:=y1-distance*sin(pi/180*angle);

    You have to write an output procedure and if you want to draw these lines and points must change the data type from real to integer.

    Greetings

    EB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Nov 2005
    From
    Wethersfield, CT
    Posts
    92
    Hi:

    Your wording has me a bit confused. For instance, you write "it is originating at x1,y1" (it referring to the line). But lines do not originate from any specific point. Rays do, but not lines. Secondly, you refer to an angle "with respect to the base". What base? Do you mean the angle relative to horizontal?

    So, I will assume that your intent is to convey the following: "Given a line in the coodinate plane with angle, , relative to horizontal, and containing point P(x1,y1), find the coordinates of point Q on the line, such that PQ=distance d.". Your question refers to a single point. But the line contains two points at distance, d. Which would you like to know about?


    I await your reply.


    Rich B.
    Last edited by Rich B.; May 22nd 2006 at 01:48 AM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    May 2006
    Posts
    6
    Hi earboth,

    Thanks for the answer. That was too simple and worked out for me

    can you please explain the formula here?!!


    Rich B. Thanks for the input and your understanding of the question is correct. I'm not that much of a Math person now, have graduated out a long time back and use math formulas rather than explaining them


    Also one more question.

    The main reason I wanted to do this is to draw two lines based on an angle which is a user's input.

    Now that I've done the angle creation part, one thing is remaining, the curve representing the angle.

    How do I draw the curve now that I know the start and the endpoint of the curve and the radius of the curve.

    Any formula for that too.

    Sorry if I'm asking for too much.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,829
    Thanks
    123
    Quote Originally Posted by hari-kj
    Hi earboth,
    Thanks for the answer. That was too simple and worked out for me
    can you please explain the formula here?!!

    Rich B. Thanks for the input and your understanding of the question is correct. I'm not that much of a Math person now, have graduated out a long time back and use math formulas rather than explaining them

    Also one more question.
    The main reason I wanted to do this is to draw two lines based on an angle which is a user's input.
    Now that I've done the angle creation part, one thing is remaining, the curve representing the angle.
    How do I draw the curve now that I know the start and the endpoint of the curve and the radius of the curve.
    Any formula for that too.
    Sorry if I'm asking for too much.
    Hello,

    as I understand you right, you've got a problem to find the commands so you can draw a part of a circle line.
    The commands I gave you with my previous post are Delphi- (or Pascal) code. Because I don't know which programming language you use I can give you only more general hints what to do: Most languages have functions like ARC. Sometimes this function is implemented into the function CIRCLE or ELLIPSE. Please check the manual of your programming language.

    I've attached a diagram, which was drawn by the (Delphi-)command:
    CANVAS.AR(x1, y1, x2, y2, x3, y3, x4, y4 : integer);

    Greetings

    EB
    Attached Thumbnails Attached Thumbnails Urgent help in finding out a point on a line-arc3.gif  
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Finding a point on a line
    Posted in the Algebra Forum
    Replies: 1
    Last Post: November 30th 2011, 01:38 AM
  2. Replies: 2
    Last Post: June 8th 2010, 04:59 PM
  3. Finding closest point on line to a point
    Posted in the Geometry Forum
    Replies: 2
    Last Post: February 3rd 2010, 11:28 AM
  4. Finding a point a certain distance from a line.
    Posted in the Pre-Calculus Forum
    Replies: 4
    Last Post: October 14th 2008, 06:49 PM
  5. Finding a point on a line closest to a given point
    Posted in the Pre-Calculus Forum
    Replies: 4
    Last Post: October 6th 2007, 12:21 AM

Search Tags


/mathhelpforum @mathhelpforum