AmbientLight[col]
三次元曲面の彩色に使用する色が col の一様環境光を指定する,三次元グラフィックス指示子である.
AmbientLight
AmbientLight[col]
三次元曲面の彩色に使用する色が col の一様環境光を指定する,三次元グラフィックス指示子である.
詳細
- AmbientLightは自然光としても知られている.
- AmbientLightは,通常,すべての方向に柔らかな光を照射して,十分な照明がない領域を埋めるために使われる.
- AmbientLight[col]は色が col の一様な環境光を与える.
- 光源の色 col は,RGBColor,Hueあるいは任意の他の色指定で定義できる.
- AmbientLightの設定は,3D曲面の拡散反射と鏡面反射に関連する色にのみ影響する.
- {dcol,Specularity[scol]}の形式の色指定がある光源は,事実上,拡散反射の目的では色 dcol を,鏡面反射の目的では色 scol を持つものとみなされる.
- 拡散反射は,事実上,光が曲面からあらゆる方向に等しく散乱するランベルト(Lambert)の法則に従うものとみなされる.
- 鏡面反射は,事実上,Specularityのページに記されているように,光が鏡面反射方向の近くでのみ散乱するとみなされる.
例題
すべて開く すべて閉じる例 (2)
スコープ (2)
Graphics3D[{AmbientLight[Orange], Sphere[], Cuboid[{1, 2, -1}, {2, 3, 1}], Cylinder[{{3, -1, 0}, {3, -1, 1}}]}, Lighting -> None]l1 = AmbientLight[GrayLevel[.3]];
l2 = DirectionalLight[Orange, {{1, 1, 1}, {0, 0, 0}}];{Graphics3D[{l2, EdgeForm[], Sphere[], Cuboid[{1, 2, -1}, {2, 3, 1}], Cylinder[{{3, -1, 0}, {3, -1, 1}}]}, Lighting -> None],
Graphics3D[{l1, l2, EdgeForm[], Sphere[], Cuboid[{1, 2, -1}, {2, 3, 1}], Cylinder[{{3, -1, 0}, {3, -1, 1}}]}, Lighting -> None]}一般化と拡張 (2)
Graphics3D[Sphere[], Lighting -> Automatic]Graphics3D[{Sphere[], AmbientLight[RGBColor[{0.4, 0.2, 0.2}]], DirectionalLight[RGBColor[{0., 0.18, 0.5}], ImageScaled[{2, 0, 2}]], DirectionalLight[RGBColor[{0.18, 0.5, 0.18}], ImageScaled[{2, 2, 3}]], DirectionalLight[RGBColor[{0.5, 0.18, 0.}], ImageScaled[{0, 2, 2}]], DirectionalLight[RGBColor[{0., 0., 0.18}], ImageScaled[{0, 0, 2}]]}]Graphics3D[{Sphere[]}, Lighting -> "Neutral"]Graphics3D[{AmbientLight[RGBColor[{.35, .35, .35}]], DirectionalLight[RGBColor[{.37, .37, .37}], ImageScaled[{2, 0, 2}]], DirectionalLight[RGBColor[{.37, .37, .37}], ImageScaled[{2, 2, 2}]], DirectionalLight[RGBColor[{.37, .37, .37}], ImageScaled[{0, 2, 2}]], Sphere[]}, Lighting -> None]アプリケーション (1)
col = {Red, Green, Blue};
objs = Graphics3D[{Specularity[White, 2], EdgeForm[], Cylinder[{{2, 2, 0}, {2, 2, 4}}], Cylinder[{{6, 2, 0}, {6, 2, 4}}], Cylinder[{{10, 2, 0}, {10, 2, 4}}]}];
walls = ParametricPlot3D[{{u, v - 2, 0}, {u, 4, 2v}}, {u, -2, 14}, {v, 0, 6}, PlotPoints -> 15, MaxRecursion -> 0, PlotStyle -> Specularity[White, 2], Mesh -> None, Axes -> False];
srcs[pos_] := Graphics3D[MapThread[{DirectionalLight[#1, {{0, -1, 0}, {0, 0, 0}}], Sphere[{#2, 0, 8}, .3]}&, {col, pos}]];
lights[pos_] := Join[{AmbientLight[GrayLevel[.1]]}, Sequence@@MapThread[{SpotLight[#1, {{#2, 0, 8}, {#2, 3, 0}}, {Pi / 2, 20}], {PointLight[#1, {#2, 0, 8}, {0, 8, 0}]}}&, {col, pos}]];Animate[With[{rx = -6Cos[t] + 6, gx = 6Sin[t] + 6, bx = 6Cos[t] + 6}, Show[objs, walls, srcs[{rx, gx, bx}], Lighting -> lights[{rx, gx, bx}], Background -> Black, Boxed -> False, ImageSize -> 300]], {t, 0, 2Pi}, SaveDefinitions -> True, AnimationRunning -> False]考えられる問題 (1)
おもしろい例題 (1)
p1[θ_] := RotationTransform[θ, {0, 0, 1}][{0, 2, 0}];
p2[θ_] := RotationTransform[θ + Pi / 2, {1, 0, 1}][{0, 2, 0}];
p3[θ_] := RotationTransform[θ + Pi, {1, 0, 0}][{0, 2, 0}];
p4[θ_] := RotationTransform[θ + 3Pi / 2, {1, 0, -1}][{0, 2, 0}];Animate[Graphics3D[{AmbientLight[GrayLevel[.1]], PointLight[Red, p1[θ]], PointLight[Green, p2[θ]], PointLight[Blue, p3[θ]], PointLight[Yellow, p4[θ]], Specularity[White, 30], Sphere[], Sphere[p1[θ], .4], Sphere[p2[θ], .4], Sphere[p3[θ], .4], Sphere[p4[θ], .4]}, Lighting -> None, PlotRange -> 2.5, Background -> Black, Boxed -> False, ImageSize -> 300], {θ, 0, 2Pi}, SaveDefinitions -> True, AnimationRunning -> False]関連するガイド
テキスト
Wolfram Research (2021), AmbientLight, Wolfram言語関数, https://reference.wolfram.com/language/ref/AmbientLight.html.
CMS
Wolfram Language. 2021. "AmbientLight." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AmbientLight.html.
APA
Wolfram Language. (2021). AmbientLight. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AmbientLight.html
BibTeX
@misc{reference.wolfram_2026_ambientlight, author="Wolfram Research", title="{AmbientLight}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/AmbientLight.html}", note=[Accessed: 10-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_ambientlight, organization={Wolfram Research}, title={AmbientLight}, year={2021}, url={https://reference.wolfram.com/language/ref/AmbientLight.html}, note=[Accessed: 10-August-2026]}