Keywords: mathematica 3d cg parametricplot3d texture torus 輪環 りんかん ドーナツ どーなつ 三芒星 さんぼうせい 三光星 さんこうせい 三稜星 さんりょうせい program プログラム code コード algorithm コード アルゴリズム geometric sculpture geometricsculpture shape geometry sculpture mapping テクスチャ マッピング 模様 もよう design pattern デザイン パターン graphic グラフィック グラフィクス structure 意匠 構造 symmetry 対称性 たいしょうせい シンメトリー 対称 たいしょう algorithm indoor black background abstract SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 400, ImageSize -> 3000, Background -> Darker[Orange, 0.8], PlotStyle -> Directive[Specularity[White, 30], Texture[Import["D:/tmp/862.jpg"]]], TextureCoordinateFunction -> ({#4 + #5, #5/Pi} &), Lighting -> "Neutral"]; a = 4; (* center hole size of a torus *) b = 3; (* tri-torus *) c = 2; (* distance from the center of rotation *) d = 5; (* number of torus *) f[v_] := Sin[2 Sin[Sin[Sin[v]]]]; x = (a - Cos[t] - f[b s]) Cos[s + Pi/(2 b)] + c; y = Sum[Sin[(2 k - 1) t]/(2 k - 1), {k, 4}] + c; z = (a - Cos[t] - f[b s]) Sin[s + Pi/(2 b)] + c; rot = Table[{x, y, z}.RotationMatrix[2 i Pi/d, {0, 1, 0}], {i, d}]; ParametricPlot3D[rot, {t, 0, 2 Pi}, {s, 0, 2 Pi}] (*--- The Texture is another color version of this: www.flickr.com/photos/tanaka_juuyoh/5412528282 The y is a 4-partial sum of the Fourier series for Square wave. yは矩形波のフーリエ展開の最初の4項 *) SetOptions[ParametricPlot3D, PlotRange -> Full, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 400, ImageSize -> 3000, Background -> Darker[Orange, 0.8], PlotStyle -> Directive[Specularity[White, 30], Texture[Import["D:/tmp/862.jpg"]]], TextureCoordinateFunction -> ({#4 + #5, #5/Pi} &), Lighting -> "Neutral"]; a = 4; (* center hole size of a torus *) b = 3; (* tri-torus *) c = 2; (* distance from the center of rotation *) d = 5; (* number of torus *) f[v_] := Sin[2 Sin[Sin[Sin[v]]]]; x = (a - Cos[t] - f[b s]) Cos[s + Pi/(2 b)] + c; y = Sum[Sin[(2 k - 1) t]/(2 k - 1), {k, 4}] + c; z = (a - Cos[t] - f[b s]) Sin[s + Pi/(2 b)] + c; rot = Table[{x, y, z}.RotationMatrix[2 i Pi/d, {0, 1, 0}], {i, d}]; ParametricPlot3D[rot, {t, 0, 2 Pi}, {s, 0, 2 Pi}] (*--- The Texture is another color version of this: www.flickr.com/photos/tanaka_juuyoh/5412528282 The y is a 4-partial sum of the Fourier series for Square wave. yは矩形波のフーリエ展開の最初の4項 *) |