Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Intersection of a Line and Circle in 3D Space

Subject: Intersection of a Line and Circle in 3D Space

From: John

Date: 18 Mar, 2009 13:35:02

Message: 1 of 4

I am trying to write a code that will measure the intersection point of a line and a circle in 3D Space. I have the initial point (x,y,z) that the line begins starts on, and I know the gradient for that line (deltaX,deltaY,deltaZ). I also have a center point for a circle (x,y,z), it's radius, and the plane it lies on (xy plane, xz plane etc...). What I want is to find out is if there is an intersection between the line and the circle, and then if so, what that intersection point is. I'm just having trouble getting the initial set up for the equations so that I can go ahead and start solving for my unknowns. Can anyone offer me some help?

-John

Subject: Intersection of a Line and Circle in 3D Space

From: us

Date: 18 Mar, 2009 13:59:01

Message: 2 of 4

"John"
> I am trying to write a code that will measure the intersection point of a line and a circle in 3D Space. I have the initial point (x,y,z) that the line begins starts on, and I know the gradient for that line (deltaX,deltaY,deltaZ). I also have a center point for a circle (x,y,z), it's radius, and the plane it lies on (xy plane, xz plane etc...). What I want is to find out is if there is an intersection between the line and the circle, and then if so, what that intersection point is. I'm just having trouble getting the initial set up for the equations so that I can go ahead and start solving for my unknowns. Can anyone offer me some help...

this NG deals with questions about ML...

us

Subject: Intersection of a Line and Circle in 3D Space

From: John D'Errico

Date: 18 Mar, 2009 14:20:18

Message: 3 of 4

"John " <john@shapestart.com> wrote in message <gpqta6$jqu$1@fred.mathworks.com>...
> I am trying to write a code that will measure the intersection point of a line and a circle in 3D Space. I have the initial point (x,y,z) that the line begins starts on, and I know the gradient for that line (deltaX,deltaY,deltaZ). I also have a center point for a circle (x,y,z), it's radius, and the plane it lies on (xy plane, xz plane etc...). What I want is to find out is if there is an intersection between the line and the circle, and then if so, what that intersection point is. I'm just having trouble getting the initial set up for the equations so that I can go ahead and start solving for my unknowns. Can anyone offer me some help?
>
> -John

As us said, your question is not actually about matlab.

But as importantly, you have not accurately specified
the problem. What do you mean by an intersection of
a line and a circle? A circle refers to the curve that lies
on the perimeter of a circular disk. In R^3, a line almost
certainly will not intersect the curve. Do you really mean
to ask if the line cuts through the interior of the circular
disk?

You cannot solve a problem that you do not fully
understand. Even if you understand what your goal is,
if you do not explain it accurately, how can you expect
any intelligent help?

I'll give you a hint. Try finding the intersection of the
line with the plane the circle lives in. How will you do
this? Now, how do you know if the located point of
intersection is inside a circle with a given center? Or,
if you are looking to see if the line actually intersects
the circle perimeter, how will you know if the line does
so? What property does the perimeter of a circle have?

Good, well written code will worry about things like if
the line happens to fall in the plane itself, or if it is
parallel to the plane but does not intersect the plane at
all.

John

Subject: Intersection of a Line and Circle in 3D Space

From: Doctor61

Date: 7 Feb, 2013 07:35:13

Message: 4 of 4

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <gpqvv2$t7t$1@fred.mathworks.com>...
> "John " <john@shapestart.com> wrote in message <gpqta6$jqu$1@fred.mathworks.com>...
> > I am trying to write a code that will measure the intersection point of a line and a circle in 3D Space. I have the initial point (x,y,z) that the line begins starts on, and I know the gradient for that line (deltaX,deltaY,deltaZ). I also have a center point for a circle (x,y,z), it's radius, and the plane it lies on (xy plane, xz plane etc...). What I want is to find out is if there is an intersection between the line and the circle, and then if so, what that intersection point is. I'm just having trouble getting the initial set up for the equations so that I can go ahead and start solving for my unknowns. Can anyone offer me some help?
> >
> > -John
>
> As us said, your question is not actually about matlab.
>
> But as importantly, you have not accurately specified
> the problem. What do you mean by an intersection of
> a line and a circle? A circle refers to the curve that lies
> on the perimeter of a circular disk. In R^3, a line almost
> certainly will not intersect the curve. Do you really mean
> to ask if the line cuts through the interior of the circular
> disk?
>
> You cannot solve a problem that you do not fully
> understand. Even if you understand what your goal is,
> if you do not explain it accurately, how can you expect
> any intelligent help?
>
> I'll give you a hint. Try finding the intersection of the
> line with the plane the circle lives in. How will you do
> this? Now, how do you know if the located point of
> intersection is inside a circle with a given center? Or,
> if you are looking to see if the line actually intersects
> the circle perimeter, how will you know if the line does
> so? What property does the perimeter of a circle have?
>
> Good, well written code will worry about things like if
> the line happens to fall in the plane itself, or if it is
> parallel to the plane but does not intersect the plane at
> all.
>
> John

I happen to have the same problem, and I wonder how this question was not clear to John. This problem is when you have the circle and the line both on one tilted plane and you want to find the two intersection points of the circle and the line, if any.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us