Keywords: parametricplot3d mathematica cg 3d texture torus square wave squarewave program プログラム code コード algorithm コード アルゴリズム geometric sculpture geometricsculpture shape geometry sculpture mapping テクスチャ マッピング 模様 もよう design pattern デザイン パターン graphic グラフィック グラフィクス structure 意匠 構造 symmetry 対称性 たいしょうせい シンメトリー 対称 たいしょう algorithm white background SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 400, ImageSize -> 3000, PlotStyle -> Directive[Specularity[White, 30], Texture[Import["D:/tmp/861.jpg"]]], TextureCoordinateFunction -> ({#4 + #5, #5/Pi} &), Lighting -> "Neutral"]; a = 7; (* center hole size of a torus *) b = 4; (* tetra-torus *) g[v_] := Sum[Cos[(2 k - 1) v]/(2 k - 1), {k, 4}]; x = (a - g[t] - Sin[b s]) Cos[s + Pi/(2 b)]; y = Sin[t]; z = (a - g[t] - Sin[b s]) Sin[s + Pi/(2 b)]; rot1 = {{x, y, z}, {z, x, y}, {y, z, x}}; rot2 = Table[{x, y, z}.RotationMatrix[i Pi/4, {1, 0, 0}], {i, 1, 3, 2}]; ParametricPlot3D[Join[rot1, rot2], {t, 0, 2 Pi}, {s, 0, 2 Pi}] (* --- The Texture is another color version of this: www.flickr.com/photos/tanaka_juuyoh/5412528282 The g[] is a 4-partial sum of the Fourier series for Square wave. g[]は矩形波のフーリエ展開の最初の4項 *) SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 400, ImageSize -> 3000, PlotStyle -> Directive[Specularity[White, 30], Texture[Import["D:/tmp/861.jpg"]]], TextureCoordinateFunction -> ({#4 + #5, #5/Pi} &), Lighting -> "Neutral"]; a = 7; (* center hole size of a torus *) b = 4; (* tetra-torus *) g[v_] := Sum[Cos[(2 k - 1) v]/(2 k - 1), {k, 4}]; x = (a - g[t] - Sin[b s]) Cos[s + Pi/(2 b)]; y = Sin[t]; z = (a - g[t] - Sin[b s]) Sin[s + Pi/(2 b)]; rot1 = {{x, y, z}, {z, x, y}, {y, z, x}}; rot2 = Table[{x, y, z}.RotationMatrix[i Pi/4, {1, 0, 0}], {i, 1, 3, 2}]; ParametricPlot3D[Join[rot1, rot2], {t, 0, 2 Pi}, {s, 0, 2 Pi}] (* --- The Texture is another color version of this: www.flickr.com/photos/tanaka_juuyoh/5412528282 The g[] is a 4-partial sum of the Fourier series for Square wave. g[]は矩形波のフーリエ展開の最初の4項 *) |