5 views (last 30 days)

Hello !

To program an active contour, I would need from the coordinates of 3 points to determine the normal of the second point.

As in the picture, I would have to determine the normal for point "a".

Any idea?

Thank you

Matt J
on 2 Apr 2020

Edited: Matt J
on 2 Apr 2020

Once you have answered David's question, the attached function should be useful. It will find the normals to all the facets of a 2D polygon. Example,

Vertices=[0 0; 1 0; 0 1]; %vertices of a triangle

normals=vert2con_special(Vertices)

gives as output,

normals =

0 -1

1 1

-1 0

John D'Errico
on 3 Apr 2020

Matt J
on 3 Apr 2020

You could use John's minboundcircle function in this FEX contribution,

to find the green circle shown in your illustration. The normal will then simply be the ray A-O from the center of the circle to the point A.

Sign in to comment.

Sign in to answer this question.

Opportunities for recent engineering grads.

Apply Today
## 3 Comments

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/514891-how-to-calculate-from-three-points-the-normal-at-the-second-point#comment_820204

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/514891-how-to-calculate-from-three-points-the-normal-at-the-second-point#comment_820204

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/514891-how-to-calculate-from-three-points-the-normal-at-the-second-point#comment_820208

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/514891-how-to-calculate-from-three-points-the-normal-at-the-second-point#comment_820208

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/514891-how-to-calculate-from-three-points-the-normal-at-the-second-point#comment_820215

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/514891-how-to-calculate-from-three-points-the-normal-at-the-second-point#comment_820215

Sign in to comment.