I am trying to compute and display the intersection of a line defined by two points and a cylinder centered around the $z$-axis defined by length and radius. So far I have
cyl = Cylinder[{{0, 0, -1}, {0, 0, 1}}, 1]
line = InfiniteLine[{{0, 0, 0}, {1, 0, 0}}]
pts = Solve[{x, y, z} ∈ cyl && {x, y, z} ∈ line, {x, y, z}, Reals]
But this returns y -> ConditionalExpression[0, -1 <= x <= 1], z ->
ConditionalExpression[0, -1 <= x <= 1]
instead of a single solution. Any hint why this is the case and how to display the solution with the intersection in a nice way?
RegionIntersection
? $\endgroup$Cylinder[]
: "Cylinder
represents a filled cylinder region..." (emphasis mine). So yes, the result you got is correct, and you indeed have a continuum of points. UseRegionBoundary[Cylinder[(* stuff *)]]
if you only want the surface. $\endgroup$RegionBoundary
approach in his comment to get only the surface. $\endgroup$