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