Normal on line

Hello,
I have some points with a line and i want to draw normal vectors on that points.Like if i plot these points , i want normal to be drawn on the specified points only.
chkx=[730 710 705 686 688 679 676];
chky=[547,540,543,535,544,544,551];
chkz=[1187,1176,1187,1172,1195,1200,1216];
plot3(chkx,chky,chkz,'--rs','LineWidth',2,...
'MarkerFaceColor','k',...
'MarkerEdgeColor','g',...
'MarkerSize',2)
Thanks

1 Comment

Oleg Komarov
Oleg Komarov on 5 Jul 2011
http://www.mathworks.com/matlabcentral/answers/7885-tutorial-how-to-format-your-question

Sign in to comment.

Answers (1)

Jan
Jan on 6 Jul 2011

0 votes

Normal to what? Your data are points in 3D, therefore a normal needs the definition of a plane. How do you define the planes for each point?

6 Comments

developer
developer on 6 Jul 2011
u can chk this figure ,i want to draw normal vectors to the specific points shown in green ,actually its not the actually but one of the scans that makes the whole plane , but to study some behaviour i want to deal each scan separately ,
http://s1204.photobucket.com/albums/bb403/attayyabkhan/?action=view&current=pic.jpg
Jan
Jan on 6 Jul 2011
The picture shows a non-smooth line. I do not see a connection between this picture and the posted code.
It is still not clear, what "normal" means in your case. Usually "normal" means orthogonal to the slope in each point. But this is defined for smooth lines only. So please take the time to define, what you want exactly.
developer
developer on 6 Jul 2011
the given code is an example while the picture is the real plot of my values , actually first i want to smooth this non smooth line as a smooth line like below
http://s1204.photobucket.com/albums/bb403/attayyabkhan/?action=view&current=pic2-1.jpg
as each point has x,y and z values so i want to implement some algorithm that make it smooth and then when i get the above desired result i can draw the normal on the same points to observe the change in angle of the whole line . I hope this i make it clear to some extent to u .
Jan
Jan on 6 Jul 2011
@Developer: You speak about x,y and z values, but you show two 2D diagrams. Therefore the problem is getting less clear.
You still do not explain what the "normal" on a 3D line should be. Imagine two points in 3D and connect them by a line. Now any line orthogonal to the connection line is "normal" - but there is an infinite number of lines, because you can rotate the normal around the connection. Let me ask a 3rd and last time: In which direction do you want to let your "normals" point?
developer
developer on 10 Aug 2011
i actually want to construct a set of vectors
that are orthogonal to the tangential plane of each surface
point they touch.
Jan
Jan on 10 Aug 2011
How is the plane defined?

Sign in to comment.

Categories

Asked:

on 5 Jul 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!