RegionPlot3D KnotData
You can feed the BoundaryMeshRegion[]
you can obtain from KnotData[]
into RegionPlot3D[]
. For example:
trefBMR = KnotData["Trefoil", "BoundaryMeshRegion"];
RegionPlot3D[RegionMember[trefBMR, {x, y, z}],
{x, -7/2, 7/2}, {y, -7/2, 7/2}, {z, -3/2, 3/2},
BoxRatios -> Automatic, Lighting -> "Neutral",
Mesh -> None, PlotPoints -> 35,
PlotStyle -> Directive[Texture[ExampleData[{"ColorTexture",
"WhiteMarble"}]]]]
Edit
n = 15;
vor = VoronoiMesh[
RandomPoint[Rectangle[{0, 0}, {2 π, 2 π}],
n], {{0, 2 π}, {0, 2 π}}];
polys = MeshPrimitives[vor, 2];
g = Show[Table[{Red,
Disk[x /. Last[#], Abs@First[#]] &@
NMinimize[SignedRegionDistance[poly][x],
x ∈ poly]}, {poly, polys}] // Graphics];
curve3 = KnotData["Trefoil", "SpaceCurve"];
basis = Last[FrenetSerretSystem[curve3[t], t]];
{tangent, normal, binormal} = basis;
ParametricPlot3D[
curve3[t] + .6 (Cos[u]*normal + Sin[u]*binormal), {u, 0,
2 π}, {t, 0, 2 π}, PlotPoints -> 80, Mesh -> None,
Boxed -> False, Axes -> False, PlotStyle -> Texture[g],
TextureCoordinateScaling -> True,
TextureCoordinateFunction -> Function[{x, y, z, u, t}, {u, 9 t}],
ViewPoint -> {0.2, -0.3, 3.3}]
Original
A starting point.
curve3 = KnotData["Trefoil", "SpaceCurve"];
basis = Last[FrenetSerretSystem[curve3[t], t]];
{tangent, normal, binormal} = basis;
g = Graphics[{Red, Disk[{0, 0}, .5]}, PlotRangePadding -> .5];
ParametricPlot3D[
curve3[t] + .6 (Cos[u]*normal + Sin[u]*binormal), {u, 0,
2 π}, {t, 0, 2 π}, PlotPoints -> 80, Mesh -> None,
Boxed -> False, Axes -> False, PlotStyle -> Texture[g],
TextureCoordinateScaling -> False,
TextureCoordinateFunction -> Function[{x, y, z, t, u}, {x, y}],
ViewPoint -> {0.2, -0.3, 3.3}]
SliceContourPlot3D[Sin[5 x] Sin[6 y] Sin[4 z],
KnotData["Trefoil", "Region"],
{x, -Pi, Pi}, {y, -Pi, Pi}, {z, -Pi, Pi},
Contours -> {-1/6, 1/6}, ContourStyle -> None,
ContourShading -> {White, Red},
Boxed -> False, ImageSize -> Large, Axes -> False, PlotPoints -> 90]