Jump to content

Maximum distance on a curve from point list


aaryan

Recommended Posts

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.

 

 

Thanks in advance

Aaryan

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

(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
)

(foo <list of points> <any point >)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...