PREVIOUS UP   Technologies Internet et Education, © TECFA
  5. PHP VRML

5. PHP VRML

Exemple 5-1: Simple exemple de génération VRML

<?  Header("Content-type: model/vrml"); 
    echo "#VRML V2.0 utf8"; ?>
// ici on définit un protype pour arbre (code pas montré)
PROTO Tree .... 

Transform {
   translation -5 0 -10
   children [
<?
for ($i=0; $i<10; $i++) {
     	for ($j=0; $j<10; $j++) {
	    echo "Tree { translation $i 0 $j }";
	}	
}
?>
  ] }
 

PREVIOUS UP -- TIE