fart/scenes/if-test.fart
Josh Holtrop 78705024e8 changed assignment operator from := to = and equals operator from = to ==
git-svn-id: svn://anubis/fart/trunk@362 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2010-10-07 20:28:21 +00:00

58 lines
1.1 KiB
Plaintext

scene
{
camera
{
position <0, -120, 80>
look_at <0, -40, 5>
}
light
{
position <100, -100, 100>
}
define material mat { color <0, 0.8, 1> }
define material mat2 { color <1, 0.7, 0> }
define material mat3 { transparency 0.5 reflectance 0.7 }
plane
{
position <0, 0, 1>, 0
material
{
color <0, 0.7, 0>
}
}
local $m = 0
for (local $x = -100; $x <= 100; $x = $x + 40)
{
for (local $y = -100; $y <= 100; $y = $y + 40)
{
sphere
{
radius 10
translate <$x, $y, 10>
if ($m % 3 == 0)
{
material mat
}
elsif ($m % 3 == 1)
{
material mat2
}
else
{
material
{
color <1, 0, 0>
transparency abs($x / 120)
}
}
}
$m = $m + 1
}
}
}