# Intersection between knot and plane

I have to find, with Mathematica, the intersection between the curve defined by a knot and a plane defined by three points, in 3D space.

I tried to find the intersection with RegionIntersection, but I don't know how to operate with the curve as a region.

I also tried to use Solve to find the points that are elements both of the curve and the plane, but unsuccesfully.

The problem is, I think, that the parametric equations that I obtain using "SpaceCurve" are not the usual parametric equations, but InterpolatingFunction (the knot is {7,4}).

How do I find the intersection? How could I use "true" parametric equations to find it? Can I transform that knot into a sort of region to use in RegionIntersection?

Sorry for my English, and thank you for your attention.

## 2 Answers

sc = KnotData["FigureEight", "SpaceCurve"];


You can use sc in ParametricPlot3D as follows:

zvals = {1};
Show[ParametricPlot3D[sc[t], {t, -Pi, Pi}, MeshFunctions -> {#3 &},
Mesh -> {zvals}, MeshStyle -> Directive[PointSize[Large], Red]],
Plot3D[zvals, {x, -3, 3}, {y, -3, 3}, Mesh -> None,
PlotStyle -> Opacity[.5], BoundaryStyle -> None]] /.
{Point -> (Sphere[#, .2] &), Line -> (Tube[#, .1] &)} Using zvals = {-1, .5}; and PlotStyle -> (Opacity[.5, #] & /@ {LightBlue, Yellow}) in Plot: Update: Using RegionIntersection and InfinitePlane

pp = ParametricPlot3D[sc[t], {t, -Pi, Pi}, Mesh -> None];
scurve = Cases[Normal@pp, _Line, ∞][];
threepoints = {{0, 0, 0}, {{1, 0, 0}, {1, Cos[π / 4], Sin[π / 4]}}};
plane = InfinitePlane @@ threepoints;
intersections = RegionIntersection[scurve, plane];

Show[pp, Graphics3D @ {Red, PointSize @ Large, intersections,
Yellow, Opacity @ .5, EdgeForm[], plane}] For sc = KnotData[{7,4}, "SpaceCurve"]; we get • Thank you! Very helpful answer! – Francesco Malito Dec 29 '17 at 17:25
• @Francesco, my pleasure. Thank you for the accept. – kglr Dec 29 '17 at 20:12

For completeness, here is how to use the MeshFunctions approach in the general case of a plane defined by three noncollinear points:

sc = KnotData["FigureEight", "SpaceCurve"];
threepoints = N[{{0, 0, 0}, {1, 0, 0}, {1, Cos[π/4], Sin[π/4]}}];
v = Flatten[Last[SingularValueDecomposition[threepoints, -1]]];
c = Mean[threepoints];

Show[ParametricPlot3D[sc[t], {t, -π, π}, MeshFunctions -> {v.({#1, #2, #3} - c) &},
Mesh -> {{0}}, MeshStyle -> Directive[PointSize[Large], Red]],
Graphics3D[{Directive[Opacity[.5, Yellow], EdgeForm[]], InfinitePlane[threepoints]}]] Another possibility is to use Plot[]'s MeshFunctions option to isolate the parameter values corresponding to the intersections. Using the same definitions as above:

tvals = Cases[Normal[Plot[v.(sc[t] - c), {t, -π, π}, Mesh -> {{0}},
MeshFunctions -> {#2 &}, MeshStyle -> {}]],
Point[{x_, y_}] :> x, ∞]
{-1.712323422790644, -3.0398127789179785, 1.387684574684945,
-0.8060547287830133, 0.5790217532175918, 0.41948543880299466}


Then,

Show[ParametricPlot3D[sc[t], {t, -π, π}],
Graphics3D[{{Directive[Opacity[.5, Yellow], EdgeForm[]], InfinitePlane[threepoints]},
{Red, Sphere[sc /@ tvals, 0.08]}}]] 