Source for file quadcube.php
Documentation is available at quadcube.php
require_once('Image/3D.php');
$light = $world->createLight ('Light', array (0 , 0 , -500 ));
$cube = $world->createObject ('quadcube', array (150 , 150 , 150 ));
$cube_s1 = $world->createObject ('quadcube', array (150 , 150 , 150 ));
$cube_s1->subdivideSurfaces (1 );
$cube_s2 = $world->createObject ('quadcube', array (150 , 150 , 150 ));
$cube_s2->subdivideSurfaces (2 );
$world->transform ($world->createMatrix ('Rotation', array (15 , 15 , 0 )));
$world->setOption (Image_3D::IMAGE_3D_OPTION_BF_CULLING , true );
$world->setOption (Image_3D::IMAGE_3D_OPTION_FILLED , true );
$world->createRenderer ('perspectively');
$world->createDriver ('GD');
$world->render (400 , 400 , 'Image_3D_Quadcube.png');
Documentation generated on Mon, 11 Mar 2019 15:48:14 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|