CODE

Flaneur Barbican - Hot Ephemerates


This image shows one sculpture clearly, and two others on the left edge.
Note the radar screen in upper right hand corner showing all the sculptures with the V shading indicating the current view.

Here is the code used to create the first of the six sculptures. Each sculpture is comprised of 7 models (6 ephemeral) built around a common center point.

//  111111111111111
$oObject = ArelXMLHelper::createLocationBasedModel3D(  // dark translucent base/area marker
		"boundary1", //ID
		"boundary1: 0.0,0,-1500", //name
		"2013_barbican/model/bgrey.zip", //model
		NULL, //texture
		$me1, //position
		array(600,600,600), //scale
		new ArelRotation(ArelRotation::ROTATION_EULERDEG, array(90,0,90)), //rotation
		"2013_barbican/img/base_150x150.jpg" //icon
);
$oObject->setTranslation(array(0,0,-1500));
ArelXMLHelper::outputObject($oObject);
//
$i="1";
while ($i <= 5) {  // each of 5 model elements is a .obj/.mtl files into a .zip and all 5 make the main part of each sulpture
$r1=rand()&90; // $r1... alter the rotation of the model
$r2=rand()&90;
$r3=rand()&90;
$s1=rand()&400; // $s1... alter the model sizes on 3 axis
$s1=$s1+10;
$s2=rand()&400;
$s2=$s2+10;
$s3=rand()&400;
$s3=$s3+10;
$m="m".$i;
$oObject = ArelXMLHelper::createLocationBasedModel3D( // a model element is created here
		"me1$i", // ID
		"element1.$i",  //name 	
		"http://stevebull.org/junaio/resources/2013_x12/$m.zip", //model
		NULL, //texture
		$me1, //location
        array($s1,$s2,$s3), //scale
        new ArelRotation(ArelRotation::ROTATION_EULERDEG, array($r1,$r2,$r3)), //rotation
		"resources/2013_barbican/img/m_150x150.jpg" // icon
);
ArelXMLHelper::outputObject($oObject);  //output the object
$i++;      //  echo $i++; the printed value would be $i before the increment (post-increment)
}
// the final tranlucent center rod of the sculpture 
$r2=rand()&10; // $r2 alters the rotation of the model slightly off vertical
$s1=rand()&1000;  // $s1... alter the model sizes on 3 axis
$s1=$s1+100;
$s2=rand()&1000;
$s2=$s2+100;
$s3=rand()&1000;
$s3=$s3+100;
//
$oObject = ArelXMLHelper::createLocationBasedModel3D(
		"c1", // ID
		"column 1",  //name 		
		"2013_barbican/model/cx$r.zip", //model and NB there 6 possible tranlucent colors for the final tranlucent center rod 
		NULL, //texture
		$me1, //location
        array($s1,$s2,$s3), //scale
        new ArelRotation(ArelRotation::ROTATION_EULERDEG, array(90,$r2,90)), //rotation
		"2013_barbican/img/cxorange_150x150.jpg" // icon
);
ArelXMLHelper::outputObject($oObject);
//
//

home