LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tangent Line on circle.

Does anyone know how to create a tangent line on a circle parallel to an existing line? The data is plotted on an XY graph.
0 Kudos
Message 1 of 3
(4,134 Views)
Start off by finding the slope "m1" of your line. If you draw a line tangent to the circle and parallel to this line you will notice that the radius that intersects the tangent line has

theta2 = theta1 + Pi/2 or Pi

depending on what side of the circle you are on.

theta1 = arctan (m1)

Since you now know the angle of the radus that intersects the tangent, find the x and y locations of the intersection point. The equation of your circle is:

x = r*cos(theta2) + h
y = r*sin(theta2) + k
where:
h is your x offset from the origin
k is your y offset from the origin

substitue for theta and you get

x = r*cos(arctan (m1)+ Pi or Pi/2) + h
y = r*sin(arctan (m1)+ Pi or Pi/2) + k

this is one point on your line. Your slope is tan(theta1) or the same thing as you
r original line. Solve for b and you have your equation.

-Jim Kring
Message 2 of 3
(4,134 Views)
What is the line? Raw data or the output from a mathematical function?

Simplest is to differentiate the data around the region you want the
tangent. This gives you the slope. The point at which the tangent touches
the circle gives you a single point on the line. From a single point and the
slope you can determine the equation of the straight line and produce the
tangent.

Daytonaman wrote in message
news:506500000008000000E5280000-993342863000@exchange.ni.com...
> Does anyone know how to create a tangent line on a circle parallel to
> an existing line? The data is plotted on an XY graph.
0 Kudos
Message 3 of 3
(4,135 Views)