Source for file pointlight.php
Documentation is available at pointlight.php
require_once('Image/3D.php');
$light = $world->createLight ('Point', array (0 , -200 , 0 , 'distance' => 300 , 'falloff' => 2 ));
for ($i = 0; $i < $steps; ++ $i) {
$y = ($steps * $step / -2 ) + $i * $step;
$world->transform ($world->createMatrix ('Rotation', array (20 , 0 , 0 )));
$world->setOption (Image_3D::IMAGE_3D_OPTION_BF_CULLING , false );
$world->setOption (Image_3D::IMAGE_3D_OPTION_FILLED , true );
$world->createRenderer ('perspectively');
$world->createDriver ('ZBuffer');
$world->render (400 , 400 , 'Image_3D_Pointlight.png');
Documentation generated on Mon, 11 Mar 2019 15:48:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|