Source for file spotlights.php
Documentation is available at spotlights.php
require_once('Image/3D.php');
$light = $world->createLight ('Light', array (-2000 , -2000 , -2000 ));
$redSpot = $world->createLight ('Spotlight', array (0 , 0 , -200 , 'aim' => array (0 , -25 , 0 ), 'angle' => 30 , 'float' => 2 ));
$blueSpot = $world->createLight ('Spotlight', array (0 , 0 , -200 , 'aim' => array (-35 , 25 , 0 ), 'angle' => 30 , 'float' => 2 ));
$greenSpot = $world->createLight ('Spotlight', array (0 , 0 , -200 , 'aim' => array (35 , 25 , 0 ), 'angle' => 30 , 'float' => 2 ));
$map = $world->createObject ('map');
for ($x = -1; $x <= 1; $x += $raster) {
for ($y = -1; $y <= 1; $y += $raster) {
$world->transform ($world->createMatrix ('Rotation', array (-20 , 10 , -10 )));
$world->createRenderer ('perspectively');
$world->createDriver ('GD');
$world->render (400 , 400 , 'Image_3D_Spotlights.png');
Documentation generated on Mon, 11 Mar 2019 15:48:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|