-
How to draw the normal to line
I have the line that slope on some angle. How I can draw normal to the end of line?
-
Bacon-wrapped closures
Not sure what you mean. Why don't you draw a picture and post it?
-
Well. How I can calculate normal vector to line?
-
Bacon-wrapped closures
A line has two normal vectors, pointing in opposite directions.
If you know the angle of the line (theta) in radians, the angles of the normal vectors are:
theta+PI/2
theta-PI/2
Or if you know the slope of the line (m), the slope of the normal line is -1/m.
Last edited by Nialsh; 04-14-2010 at 04:49 PM.
Reason: oops, it's pi/2 not pi
-
Is there a way avoid to calculate angles? I need just normalized normal vector (i e vector that has length 1).
-
Bacon-wrapped closures
How is your line defined? Is it a line segment formed by two points?
-
Of course yes. B/c I need to draw its with Flash draw API.
-
Bacon-wrapped closures
If you points are A and B, your normals are:
<By-Ay, Ax-Bx>
<Ay-By, Bx-Ax>
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|