# coding=UTF-8
from visual import *
# 不透明度を設定
for lc in range(0,9):
sphere1 = sphere(pos=(lc, 0, 0), radius=1,
color=(0x99/255.,0xdd/255.,0xff/255.),
opacity=(10-lc)/10.)
実行画面

動作環境
Python 3.1.3, VPython 5.41
graph graph9
{
node [fontname="MS Gothic"];
computer[image="computer.png", label="コンピューター"];
harddisk[image="drive-harddisk.png"];
mouse[image="input-mouse.png"];
computer -- harddisk;
computer -- mouse;
}

# coding=UTF-8
from visual import *
# テクスチャを使用
sphere1 = sphere(pos=(0, 0, 0), radius=1,
material = materials.texture(
data=materials.loadTGA('sf_128x128.tga'),
mapping='spherical'))
# 回転
sphere1.rotate(angle=pi*260./180., axis=(1,0,1))

rem 環境によって変えてね
set im=C:\Progra~1\ImageMagick-6.6.6-Q16
%im%\convert.exe sf.jpg -resize 128x128 sf_128x128.tga
graph graph8
{
node [fontname="MS Gothic"];
computer[image="computer.png"];
harddisk[image="drive-harddisk.png"];
mouse[image="input-mouse.png"];
computer -- harddisk;
computer -- mouse;
}

# 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)

graph graph7
{
node [fontname="MS Gothic"];
項目2[height=0.8];
項目1 -- 項目2 -- 項目3;
項目2 -- 項目4;
}

# coding=UTF-8
from visual import *
# ウインドウをフルスクリーンに設定
scene.fullscreen = True
# 球を作成
sphere1 = sphere(pos=(0, 0, 0), radius=1,
color=(0x99/255.,0xdd/255.,0xff/255.))
graph graph6
{
node [fontname="MS Gothic"];
項目2[fontsize=24];
項目1 -- 項目2 -- 項目3;
項目2 -- 項目4;
}

graph graph5
{
graph[bgcolor="#ccddff"];
node [fontname="MS Gothic"];
項目1 -- 項目2 -- 項目3;
項目2 -- 項目4;
}

graph graph4
{
node [fontname="MS Gothic"];
項目2[fontcolor="#ffaa00"];
項目1 -- 項目2 -- 項目3;
項目2 -- 項目4;
}

graph graph3
{
node [fontname="MS Gothic"];
項目2[fillcolor="#ccddff", style="filled"];
項目1 -- 項目2 -- 項目3;
項目2 -- 項目4;
}

graph graph2
{
node [fontname="MS Gothic"];
項目2[color="#7799dd"];
項目1 -- 項目2 -- 項目3;
項目2 -- 項目4;
}

graph graph1
{
node [fontname="MS Gothic"];
項目1 -- 項目2 -- 項目3;
項目2 -- 項目4;
}

# coding=UTF-8
from visual import *
# 球を作成
sphere1 = sphere(pos=(0, 0, 0), radius=1,
color=(0x99/255.,0xdd/255.,0xff/255.))
# ラベルを作成
textlabel = label(pos=sphere1.pos,
text='球のサンプル', xoffset=70,
yoffset=80, space=100,
color=(0xff/255.,0xdd/255.,0x66/255.),
linecolor=(0xcc/255.,0xcc/255.,0xcc/255.),
height=20, border=6,
font='MS ゴシック')

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja"
xml:lang="ja" dir="ltr">
<head>
<title>gd_test7</title>
</head>
<body>
<?php
// 入力ファイル名
$fn = "sf.jpg";
// 入力ファイルサイズ取得
$bimg = imagecreatefromjpeg($fn);
//imagefilter($bimg, IMG_FILTER_GRAYSCALE);
$sx = imagesx($bimg);
$sy = imagesy($bimg);
$img = imagecreatetruecolor($sx, $sy);
imagesavealpha($img, true);
imagealphablending($img, false);
// 半透明のノイズをかける
for($ly=0;$ly<$sy;$ly++){
for($lx=0;$lx<$sx;$lx++){
$pa = rand(5,40);
$px = imagecolorat($bimg, $lx, $ly);
$pr = ($px >> 16) & 0xff;
$pg = ($px >> 8 ) & 0xff;
$pb = $px & 0xff;
imagesetpixel($img, $lx, $ly,
imagecolorresolvealpha($img, $pr, $pg, $pb, $pa));
}
}
// ファイル出力
imagepng($img, "gd_test7.png");
// 開放
imagedestroy($img);
imagedestroy($bimg);
?>
<img src="gd_test7.png" /><br />
</body>
</html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja"
xml:lang="ja" dir="ltr">
<head>
<title>gd_test6</title>
</head>
<body>
<?php
// 入力ファイル名
$fn = "sf.jpg";
// 入力ファイルサイズ取得
$bimg = imagecreatefromjpeg($fn);
//imagefilter($bimg, IMG_FILTER_GRAYSCALE);
$sx = imagesx($bimg);
$sy = imagesy($bimg);
$img = imagecreatetruecolor($sx, $sy);
imagesavealpha($img, true);
imagealphablending($img, false);
// 半透明の網掛けをかける
for($ly=0;$ly<$sy;$ly++){
for($lx=0;$lx<$sx;$lx++){
$pa = (($ly + $lx)% 2 == 0)?0:0x40;
$px = imagecolorat($bimg, $lx, $ly);
$pr = ($px >> 16) & 0xff;
$pg = ($px >> 8 ) & 0xff;
$pb = $px & 0xff;
imagesetpixel($img, $lx, $ly,
imagecolorresolvealpha($img, $pr, $pg, $pb, $pa));
}
}
// ファイル出力
imagepng($img, "gd_test6.png");
// 開放
imagedestroy($img);
imagedestroy($bimg);
?>
<img src="gd_test6.png" /><br />
</body>
</html>
