Keywords: mathematica 3d cg parametricplot3d texture torus code program algorithm プログラム コード アルゴリズム 輪環 りんかん ドーナツ どーなつ トーラス とーらす knot 結び目 むすびめ mapping テクスチャ マッピング 模様 もよう design pattern デザイン パターン graphic グラフィック グラフィクス structure 意匠 構造 symmetry 対称性 たいしょうせい シンメトリー 対称 たいしょう white background abstract indoor circle round a = 5; (* center hole size of a torus *) b1 = 5;(* the number of angles *) b2 = 4;(* the number of waves *) b3 = 4; (* the number of knots *) c = 1; (* distance from the center of rotation *) d = 3; (* the number of tori *) h1 = 1; (* width of a torus *) h2 = 1; (* width of a torus *) h3 = 1; (* height of cross *) SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 500, ImageSize -> 3000, Background -> RGBColor[{240, 240, 200}/255], PlotStyle -> Directive[Specularity[White, 50], Texture[Import["D:/tmp/911.jpg"]]], TextureCoordinateFunction -> ({#4, #5 /Pi} &), Lighting -> "Neutral"]; x = (a - h1 Cos[t] + h2 Sin[b1 s]) Cos[b3 s] + c; y = (a - h1 Cos[t] + h2 Sin[b1 s]) Sin[b3 s] + c; z = h3 Cos[b1 s] + Sin[b2 t] + c; rm = Table[{x, y, z}.RotationMatrix[2 i Pi/d, {0, 0, 1}], {i, d}]; ParametricPlot3D[rm, {t, 0, 2 Pi}, {s, 0, 2 Pi}] (*--- The Texture *) a = 5; (* center hole size of a torus *) b1 = 5;(* the number of angles *) b2 = 4;(* the number of waves *) b3 = 4; (* the number of knots *) c = 1; (* distance from the center of rotation *) d = 3; (* the number of tori *) h1 = 1; (* width of a torus *) h2 = 1; (* width of a torus *) h3 = 1; (* height of cross *) SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 500, ImageSize -> 3000, Background -> RGBColor[{240, 240, 200}/255], PlotStyle -> Directive[Specularity[White, 50], Texture[Import["D:/tmp/911.jpg"]]], TextureCoordinateFunction -> ({#4, #5 /Pi} &), Lighting -> "Neutral"]; x = (a - h1 Cos[t] + h2 Sin[b1 s]) Cos[b3 s] + c; y = (a - h1 Cos[t] + h2 Sin[b1 s]) Sin[b3 s] + c; z = h3 Cos[b1 s] + Sin[b2 t] + c; rm = Table[{x, y, z}.RotationMatrix[2 i Pi/d, {0, 0, 1}], {i, d}]; ParametricPlot3D[rm, {t, 0, 2 Pi}, {s, 0, 2 Pi}] (*--- The Texture *) |