Message Boards Message Boards

[GIF] Inevitability ((7, 3)-torus knot)

GROUPS:

(7, 3)-torus knot

Inevitability

Same basic code as To Infinity, but this time with a $(7,3)$ torus knot and simpler lighting. Also, viewed from above rather than from the front.

Stereo3D[{x1_, y1_, x2_, y2_}] := {x1/(1 - y2), y1/(1 - y2), x2/(1 - y2)};

pqtorus[t_, p_, q_] := 1/Sqrt[2] {E^(p I t), E^(q I t)};

With[{viewpoint = {0, 0, 10}, 
  cols = RGBColor /@ {"#EDF2F6", "#494953"}},
 Manipulate[
  Graphics3D[{Sphere[#, .1] & /@ 
     Table[Stereo3D[Flatten[ReIm /@ pqtorus[t + θ, 7, -3]]], {t, 0, 2 π, 2 π/200}]}, 
   PlotRange -> 3, ViewPoint -> viewpoint, 
   ViewVertical -> {0, 1, 0}, Boxed -> False, 
   Background -> cols[[-1]], ImageSize -> 540,
   Lighting -> {{"Point", cols[[1]], {0, 0, 1/2}}, {"Ambient", cols[[-1]], viewpoint}}],
  {θ, 0, π/100}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
3 months ago

Some slight shortening:

With[{viewpoint = {0, 0, 10}, cols = RGBColor /@ {"#EDF2F6", "#494953"}}, 
        Manipulate[Graphics3D[{Sphere[Table[(Most[#]/(1 - Last[#])) & [
                                            Flatten[ReIm[Exp[{7, -3} I (t + θ)]/Sqrt[2]]]],
                                            {t, 0, 2 π, 2 π/200}], 0.1]}, Background -> cols[[-1]],
                               Boxed -> False, ImageSize -> 540, 
                               Lighting -> {{"Point", cols[[1]], {0, 0, 1/2}},
                                            {"Ambient", cols[[-1]], viewpoint}}, PlotRange -> 3, 
                               ViewPoint -> viewpoint, ViewVertical -> {0, 1, 0}], {θ, 0, π/100}]]
POSTED BY: J. M.
Answer
3 months ago

Jeez. Every time I learn about some new function I'd never heard of before (Most this time).

POSTED BY: Clayton Shonkwiler
Answer
3 months ago

enter image description here - Congratulations! This post is now a Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

POSTED BY: Moderation Team
Answer
3 months ago

Group Abstract Group Abstract