SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)

    More of a math question, don't know the term to google it

    If you can think of what the term may be so that I can google for this myself that would be perfect. Lets say I have a collection (array) of x,y points, doesn't really matter what they are, heres the most basic example:

    5,5
    10,10
    0,1
    -5,-5

    Heres my question. say I plot a line from 5,5 to -5,-5: I would like to know which other points are within a distance of x. If x = 3, 0,1 would be returned but 10,10 is obviously not within a distance of 3.

    Again sorry for this, I dont need someone to teach me, just looking for the term so that I can do that on my own

    Also, would the term be the same for a 3d plane? x,y and z?

  2. #2
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by K. Wolfe View Post
    If you can think of what the term may be so that I can google for this myself that would be perfect. Lets say I have a collection (array) of x,y points, doesn't really matter what they are, heres the most basic example:

    5,5
    10,10
    0,1
    -5,-5

    Heres my question. say I plot a line from 5,5 to -5,-5: I would like to know which other points are within a distance of x. If x = 3, 0,1 would be returned but 10,10 is obviously not within a distance of 3.

    Again sorry for this, I dont need someone to teach me, just looking for the term so that I can do that on my own

    Also, would the term be the same for a 3d plane? x,y and z?
    For those interested, I think this source may be able to help me out:

    http://math.stackexchange.com/questi...ither-x-or-y-0

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Location
    Northern Minnesota
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you want the distance between a point and a line segment. Here's another possibly helpful link... http://geomalgorithms.com/a02-_lines.html

  4. #4
    Always A Novice bronze trophy
    K. Wolfe's Avatar
    Join Date
    Nov 2003
    Location
    Columbus, OH
    Posts
    2,182
    Mentioned
    67 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by davclark View Post
    I think you want the distance between a point and a line segment. Here's another possibly helpful link... http://geomalgorithms.com/a02-_lines.html
    Ah thank you. I've got an idea on how to force this operation on both a 2d and 3d plane, but I wonder if theres a smooth way of doing this in a programming language. I am messing with this (slowly) and will put my results here as I come up with results.

    EDIT: Scrolling down I actually see your page provides code examples, aswesome!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •