# coding=UTF-8
from visual import *
# 木の材質
sphere1 = sphere(pos=(-2, 2, 0), radius=1,
material = materials.wood)
# でこぼこな材質
sphere2 = sphere(pos=(0, 2, 0), radius=1,
material = materials.rough)
# 大理石っぽい材質
sphere3 = sphere(pos=(2, 2, 0), radius=1,
material = materials.marble)
# プラスチックっぽい材質
sphere4 = sphere(pos=(-2, 0, 0), radius=1,
material = materials.plastic)
# 地球
sphere5 = sphere(pos=(0, 0, 0), radius=1,
material = materials.earth)
# diffuse(拡散)
sphere6 = sphere(pos=(2, 0, 0), radius=1,
material = materials.diffuse)
# emmisive(放射)
sphere7 = sphere(pos=(-2, -2, 0), radius=1,
material = materials.emissive)
# 光の影響を受けない材質
sphere8 = sphere(pos=(0, -2, 0), radius=1,
material = materials.unshaded)
実行画面
動作環境
Python 3.1.3, VPython 5.41