Pt on 3d Polyline

Discussion in 'AutoCAD' started by lorier, Sep 18, 2004.

  1. lorier

    lorier Guest

    Hello,
    I have a 3d polyline, let's say, with coordinates (0,0,0), (1,40,50),(0,50,100). What would be the easiest way to find the x and y where the z is 75 for example? Do I have to cycle through the coordinates and use the distance formula?

    TIA
     
    lorier, Sep 18, 2004
    #1
  2. The only way I know of is to iterate, like you say, and interpolate. But
    you don't need a distance formula, just linear interpolation.

    For line that goes from x1,y1,z1 to x2,y2,z2 ... and crosses zC. Find
    xC,yC:

    Solution:
    %along = (zC-z1)/(z2-z1) 'since you know all 3 Z values
    xC = (%along * (x2 - x1)) + x1
    yC = (%along * (y2 - y1)) + y1

    This is an excerpt from this thread:
    http://groups.google.com/groups?threadm=


    HTH,
    James
     
    James Belshan, Sep 20, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.