Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
light properties
光源の概要
説明
lightエンティティは外観照明を変更するためのプロパティを有します. 照明は軸内では不可視ですが,曲面の外観に影響を与えます. (照明の詳細については照明を参照ください).
光源は light 関数により作成でき, delete 関数により削除されます.

lightプロパティのリスト
- visible:
このフィールドは光源の有効(
"on"
)または 無効("off"
)を定義します.- light_type:
このフィールドは使用される光の型を定義します. 以下の2種類の光を利用できます:
"directional"
および"point"
. 方向性(directional)光源は,曲面から無限遠に位置する光源で,平行線となります.点(point)光源は,全ての方向に放射する空間の点として 定義されます. デフォルト値は
"point"
です.- direction:
このフィールドは方向性光源の光線方向を定義します. 方向は,原点からのベクトルを表す 3要素ベクトル
"[x, y, z]"
により変更できます.デフォルト値は
"[0 0 1]"
です.- position:
このフィールドは,点光源の光源位置を定義します. 位置は3要素ベクトル
"[x, y, z]"
により変更できます.デフォルト値は
"[0 0 1]"
です.- ambient_color:
このフィールドは光源のアンビエント色を定義します. この色は3要素ベクトル
"[red, green, blue]"
(各要素の範囲は[0, 1])により定義されます.デフォルト値は
"[0.1 0.1 0.1]"
です.- diffuse_color:
このフィールドは光源の拡散色を定義します. この色は3要素ベクトル
"[red, green, blue]"
(各要素の範囲は[0, 1])により定義されます.デフォルト値は
"[1 1 1]"
です.- specular_color:
このフィールドは光源の鏡面反射色を定義します. この色は3要素ベクトル
"[red, green, blue]"
(各要素の範囲は[0, 1])により定義されます.デフォルト値は
"[1 1 1]"
です.- user_data:
This field can be use to store any scilab variable and to retrieve it.
- tag:
This field can be use to store a character string generally used to identify the light entity. It allows to give it a "name". Mainly used in conjunction with findobj() and get()/set() functions.
例
// 点光源 plot3d;l=light();s=gce(); for i=0:1000 sleep(5); x = 2*cos(i*%pi/180); y = 2*sin(i*%pi/180); z = 2; l.position = [x y z]; end // 方向性光源に光源を変更 l.light_type = "directional"; l.direction = [1 0 1]; l.ambient_color = [0.1 0.1 0.1]; s.diffuse_color = [0.4 0.4 0.4]; s.use_color_material = "off"; s.color_flag = 0; s.thickness = 0; s.hiddencolor = -1; s.specular_color = [0.6 0.6 0.6]; sleep(5000); l2 = light(ambient_color=[0 0 0], diffuse_color = [0.8 0.8 1], type="point", position=[0 3 4]); sleep(5000); delete(l); l2.specular_color = [1 0.6 0];
Report an issue | ||
<< light | lighting | lighting >> |