Message Boards Message Boards

GROUPS:

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

Posted 1 year ago
2579 Views
|
3 Replies
|
5 Total Likes
|

(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}]
 ]
3 Replies
Posted 1 year 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

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

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

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract