AIG-3D.ps Page 1
AIG-3D.ps Page 2
AIG-3D.ps Page 3
AIG-3D.ps Page 4
AIG-3D.ps Page 5
AIG-3D.ps Page 6
AIG-3D.ps Page 7
AIG-3D.ps Page 8
<node id="on_button" > <script id="on_button_script"> <command> <trigger type="message_event" value="sensor-mouse-in" /> <action> <set_node_attribute_value displayed="true"/> <target type="single_node" value="#lamp" /> </command> </script> <quad id="on_button" >... </quad> <node id="sensor_cube.001"> <touchsensor id="sensor_cube.001" x1="0.0" y1="0.0" z1="0.0" message_in="sensor-cube-in" message_out="sensor-cube-out"/> AIG-3D.ps Page 9
<aliasscript> <command pattern="/translate s f f f"> <action> <set_node_attribute_value operator="="> <transformation x="({$2})" y="({$3})" z="({$4})" /> </set_node_attribute_value> <target type="single_node" value="#({$1})" /> </command> </aliasscript> <action> <send_message_udp value="/tr ({$Camera_translation:x})" /> <target type="single_host" value="udp_client" /> AIG-3D.ps Page 10
<command> <trigger type="message_event" value="sensor-mouse-in" /> <action> <send_message value="/color 1.0 0.0 0.0"/> <target type="multiple_nodes" value="#cube*" /> </command> <command> <trigger type="cyclic_time" begin="0" period="0.000002"/> <action> <set_node_attribute_value operator="+="> <transformation x="({$root:translationx_step})" y="({$root:translationy_step})" z="({$root:translationz_step})" /> </set_node_attribute_value> <target type="single_node" value="#cube.002_transl" /> </command> <command> <trigger type="time_limit" value="3"/> <action> <set_node_attribute_value operator="+="> <transformation z="3" /> </set_node_attribute_value> <target type="multiple_nodes" value="#cube*transl" /> </command> AIG-3D.ps Page 11
<initializationscript id="beginning_script"> <command> <action> <write_message value="welcome" /> <action delay="1"> <write_message value="to the cubic world!" /> <action delay="2"> <write_message value="" /> </command> </initializationscript> <terminationscript id="termination_script"> <command> <action> <send_message_udp value="/end"/> <target type="single_host" value="udp_client" /> </command> </terminationscript> <node id="cube.001_interp_transl"> <interpolator id="cube.001_interp_transl" type="transformation" size="2"> <schedule begin="0" dur="2" repeatcount="100" mode="sinus-periodic"/> <transformation id="cube.001_transl_ini" geometry="translation" x="-8" y="0.0" z="5" /> <transformation id="cube.001_transl_end" geometry="translation" x="-8" y="0.0" z="10" /> </interpolator> AIG-3D.ps Page 12
<schedule begin="0" dur="2" repeatcount="100" mode="sinus-periodic" before="hide" fill="hide"> <updatescript> <command> <action> <set_material_attribute_value operator="="> <emission r="(0.2*({$cube.001_interp_transl:z}-5))" /> </set_material_attribute_value> <target type="single_node" value="#cube" /> </command> </updatescript> </schedule> <node id="cube_interpolator"> <interpolator id="cube_interpolator" type="node" size="2"> <schedule begin="0" dur="10" repeatcount="1" mode="linear" fill="freeze" ini="1" end="2"/> <node id="cube_1"> <subdivision id="cube_1" levels="1" level0_vertices="8"... >... </subdivision> <node id="cube_2"> <subdivision id="cube_2" levels="1" level0_vertices="8"... > </subdivision> </interpolator> AIG-3D.ps Page 13
<scalar id="fade_in" type="float" > <interpolator id="fade_in" type="scalar" size="2"> <schedule begin="10" dur="20" repeatcount="1" mode="sinus" fill="freeze" > <updatescript> <command> <action> <set_material_attribute_value operator="="> <diffuse a="({$root:fade_in})" /> </set_material_attribute_value> <target type="single_node" value="#cube" /> </command> </updatescript> <scalar id="fade_in_src" type="float" value="0"/> <scalar id="fade_in_target" type="float" value="1"/> </interpolator> </scalar> <!-- table defined by interpolation between 9 tables --> <table id="interp_mat" type="float" size="3" > <interpolator id="interp_mat" type="table" size="9"> <schedule begin="5" dur="50" repeatcount="1" mode="linear" fill="freeze" > <updatescript> <command> <!-- defines the emission of an object --> <action> <set_material_attribute_value operator="="> <emission r="({$root:interp_mat[1]})" g="({$root:interp_mat[2]})" b="({$root:interp_mat[3]})" /> </set_material_attribute_value> <target type="single_node" value="#cube" /> </command> </updatescript> </schedule> AIG-3D.ps Page 14
<!-- 9 tables that correspond to 9 emission colors --> <table id="interp_mat_1" type="float" size="3" value="( 0.0, 0.0, 0.0 )"/> <table id="interp_mat_2" type="float" size="3" value="( 1.0, 0.0, 0.0 )"/> <table id="interp_mat_3" type="float" size="3" value="( 0.0, 1.0, 0.0 )"/> <table id="interp_mat_4" type="float" size="3" value="( 0.0, 0.0, 1.0 )"/> <table id="interp_mat_5" type="float" size="3" value="( 1.0, 1.0, 0.0 )"/> <table id="interp_mat_6" type="float" size="3" value="( 1.0, 0.0, 1.0 )"/> <table id="interp_mat_7" type="float" size="3" value="( 0.0, 1.0, 1.0 )"/> <table id="interp_mat_8" type="float" size="3" value="( 1.0, 1.0, 1.0 )"/> <table id="interp_mat_8" type="float" size="3" value="( 0.0, 0.0, 0.0 )"/> </interpolator> </table> <node id="cube.002_transl"> <transformation id="cube.002_transl" geometry="translation" x="3" y="4" z="1" /> <node id="cube.002_rotation"> <transformation id="cube.002_transl" geometry="rotation" angle="90" x="0" y="0" z="1" /> <node id="cube.002_scale"> <transformation id="cube.002_transl" geometry="scale" x="1" y="1" z="-1" /> <node id="cube.002_transl"> <transformation id="cube.002_transl" geometry="translation" x="3" y="4" z="1" /> <node id="cube.002_rot"> <transformation id="cube.002_rot" geometry="rotation" x="1.0" y="0.0" z="0.0" angle="90.0" /> <node id="cube.002_scale"> <transformation id="cube.002_scale" geometry="scale" x="1.0" y="1.0" z="-1.0" /> <node id="cube.002"> <subdivision id="cube.004" levels="1" >... </subdivision> AIG-3D.ps Page 15
<!-- transforms a xz plane ellipse transf into a xy plane ellipse transf --> <node id="ellipse_rot"> <transformation id="ellipse_rot" geometry="rotation" x="1" y="0" z="0" angle="90" /> <!-- ellipse translation --> <node id="camera_ellipse_transf" interactable="true" testable="true" > <transformation id="camera_ellipse_transf" geometry="ellipse-transformation" with_roll="false"> <schedule begin="0" dur="5" repeatcount="1000000" mode="linear" fill="freeze"/> <ellipse id="camera_ellipse" a="15" b="-15" x="0" y="10" z="0" /> </transformation> <node id="camera_ellipse_transf" > <transformation id="camera_ellipse_transf" geometry="ellipse-transformation" with_roll="false"> <schedule begin="0" dur="5" repeatcount="1000000" mode="linear" fill="freeze"/> <ellipse id="camera_ellipse" a="15" b="-15" x="0" y="10" z="0" /> </transformation> <!-- camera pitch rotation --> <node id="camera_rot"> <transformation id="camera_rot" geometry="rotation" x="0" y="0" z="1" angle="30" /> <!-- camera yaw rotation --> <node id="camera_rot"> <transformation id="camera_rot" geometry="rotation" x="0" y="1" z="0" angle="90" /> <!-- head lamp bound to camera --> <node id="lamp"> <light id="lamp" type="light" constant_attenuation="0.0" linear_attenuation="0.1">... </light> <!-- camera --> <node id="camera"> <viewpoint id="camera"/> AIG-3D.ps Page 16
<node id="path_transf_camera"> <transformation id="path_transf_camera" geometry="path-transformation" size="1" with_roll="true"> <schedule begin="3" dur="10" repeatcount="1" mode="linear" fill="freeze"/> <path id="path camera" size="1" width="0.2" segments="300"> <bezier size="4" location="1" x1="25" y1="0" z1="30" x2="15" y2="-5" z2="15" x3="5" y3="15" z3="3" x4="-4" y4="3" z4="3" n_x="0" n_y="0" n_z="1"/> </path> </transformation> AIG-3D.ps Page 17
<node id="root" > <scalar id="translation_step" type="float" value="0.01" /> <set_node_attribute_value operator="+="> <transformation x="{$root:translation_step}" /> </set_node_attribute_value> <set_node_scalar_value id="translation_step" value="0.01" operator="+="/> <target type="single_node" value="#root" /> <set id="nbalignedquads" value="10"/> <quad x1="(10*{#nbalignedquads})" z1="-200" y1="-10"... /> AIG-3D.ps Page 18
<node id="root" > <table id="delay" type="float" size="3" value="(-0.523,-0.469,-0.168)" /> <quad y3="({$root:delay[1]}*20.0-10.0)" y4="({$root:delay[2]}*20.0-10.0)" /> <set_node_table_value id="delay" value="({@root:increment})" operator="+="/> <target type="single_node" value="#root" /> AIG-3D.ps Page 19
AIG-3D.ps Page 20
AIG-3D.ps Page 21
AIG-3D.ps Page 22