Keywords: mathematica 3d cg parametricplot3d texture torus 輪環 りんかん ドーナツ どーなつ 四芒星 しぼうせい 四光星 しこうせい 四稜星 しりょうせい program プログラム code コード algorithm コード アルゴリズム geometric sculpture geometricsculpture shape geometry sculpture mapping テクスチャ マッピング 模様 もよう design pattern デザイン パターン graphic グラフィック グラフィクス structure 意匠 構造 symmetry 対称性 たいしょうせい シンメトリー 対称 たいしょう algorithm bright pastel SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 300, ImageSize -> 3000, Background -> Darker[Green, 0.8], PlotStyle -> Directive[Specularity[White, 30], Texture[Import["D:/tmp/86.jpg"]]], TextureCoordinateFunction -> ({#4 + #5, #5/Pi} &), Lighting -> "Neutral"]; a = 6; (* center hole size of a torus *) b = 4; (* tetra-torus *) d = 3; (* number of torus *) f[v_] := Sum[TriangleWave[{-1, 1}, (2 k - 1) v]/(2 k - 1), {k, 3}]; g[v_] := Sum[TriangleWave[{-1, 1}, (2 k - 1) (v + 1/4)]/(2 k - 1), {k, 3}]; x = (a - f[t] - g[b s]) f[s + 1/(2 b)]; y = g[t]; z = (a - f[t] - g[b s]) g[s + 1/(2 b)]; rot = Table[{x, y, z}.RotationMatrix[2 i Pi /d, {1, 0, 0}], {i, d}]; ParametricPlot3D[rot, {t, 0, 1}, {s, 0, 1}] (* --- The Texture *) SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 300, ImageSize -> 3000, Background -> Darker[Green, 0.8], PlotStyle -> Directive[Specularity[White, 30], Texture[Import["D:/tmp/86.jpg"]]], TextureCoordinateFunction -> ({#4 + #5, #5/Pi} &), Lighting -> "Neutral"]; a = 6; (* center hole size of a torus *) b = 4; (* tetra-torus *) d = 3; (* number of torus *) f[v_] := Sum[TriangleWave[{-1, 1}, (2 k - 1) v]/(2 k - 1), {k, 3}]; g[v_] := Sum[TriangleWave[{-1, 1}, (2 k - 1) (v + 1/4)]/(2 k - 1), {k, 3}]; x = (a - f[t] - g[b s]) f[s + 1/(2 b)]; y = g[t]; z = (a - f[t] - g[b s]) g[s + 1/(2 b)]; rot = Table[{x, y, z}.RotationMatrix[2 i Pi /d, {1, 0, 0}], {i, d}]; ParametricPlot3D[rot, {t, 0, 1}, {s, 0, 1}] (* --- The Texture *) |