Source for file 3ds.php
Documentation is available at 3ds.php
require_once('Image/3D.php');
$light1 = $world->createLight (-20 , -20 , -20 );
$light2 = $world->createLight (20 , 20 , -20 );
$text = $world->createObject ('3ds', 'models/Image_3D.3ds');
$text->transform ($world->createMatrix ('Rotation', array (110 , 40 , 0 )));
$text->transform ($world->createMatrix ('Scale', array (7 , 7 , 7 )));
$world->setOption (Image_3D::IMAGE_3D_OPTION_BF_CULLING , false );
$world->setOption (Image_3D::IMAGE_3D_OPTION_FILLED , true );
$world->createRenderer ('perspectively');
$world->createDriver ('GD');
$world->render (400 , 200 , 'Image_3D_Object_3ds.png');
Documentation generated on Mon, 11 Mar 2019 14:04:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|