# Thread: Maximum distance on a curve from point list

1. ## Maximum distance on a curve from point list

Registered forum members do not see this ad.

Dear All,

I have a list of points which lies on the curve, is there a way to find which point has maximum distance on a curve. If so please give me a solution.

Aaryan

2. maximum distance from which point ?

3. Thanks Tharwat

Maximum distance along curve from starting point of curve.
suppose i have 3 points in a list which lies exactly on curve object, one point is at 100m and second is at 101.235m and third may be at 94.222m. Like this second point has maximum distance. Any guess

4. This function is to give you the far most distance from a given point .

Code:
```(defun foo (l p / d dis mx)
(setq d 0.)
(foreach pt l
(if (> (setq dis (distance p pt)) d)
(setq mx pt
d  dis
)
)
)
mx
)```
Code:
`(foo <list of points> <any point >)`

5. Thanks Both..

6. Registered forum members do not see this ad.

For the straight line distance, use the distance function; for the distance along the curve, use the vlax-curve-getdistatpoint function.

#### Posting Permissions

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