12345 |
- <xml xmlns="http://blockscad.einsteinsworkshop.com"><version num="1.3.0"></version><color rgba="255,128,255"></color><block type="controls_for" id="163" x="-612" y="-235"><field name="VAR">i</field><field name="HULL">TRUE</field><comment pinned="true" h="221.56998443603516" w="452.82000732421875">Sun using a Hulled Loop
- Checking the "hull" option in the loop does pairwise hulls between iterations n and n+1. It can handle 2D or 3D input.
- Here the loop is rotating a cube around the origin. The if statement checks if the loop index is even, and adjusts the side of the cube and the radius of its translation. Hull then "connects the dots" into a sun shape. You can uncheck the "hull" option to see the original cubes drawn by the loop.</comment><value name="FROM"><block type="math_number" id="164"><field name="NUM">0</field></block></value><value name="TO"><block type="math_number" id="165"><field name="NUM">24</field></block></value><value name="BY"><block type="math_number" id="166"><field name="NUM">1</field></block></value><statement name="DO"><block type="simplerotate" id="167"><value name="XVAL"><block type="math_angle" id="168"><field name="NUM">0</field></block></value><value name="YVAL"><block type="math_angle" id="169"><field name="NUM">0</field></block></value><value name="ZVAL"><block type="math_arithmetic" id="170"><field name="OP">MULTIPLY</field><value name="A"><block type="math_angle" id="171"><field name="NUM">15</field></block></value><value name="B"><block type="variables_get" id="172"><field name="VAR">i</field></block></value></block></value><statement name="A"><block type="controls_if" id="173"><mutation else="1"></mutation><value name="IF0"><block type="math_number_property" id="174"><mutation divisor_input="false"></mutation><field name="PROPERTY">EVEN</field><value name="NUMBER_TO_CHECK"><block type="variables_get" id="175"><field name="VAR">i</field></block></value></block></value><statement name="DO0"><block type="translate" id="176"><value name="XVAL"><block type="math_number" id="177"><field name="NUM">15</field></block></value><value name="YVAL"><block type="math_number" id="178"><field name="NUM">0</field></block></value><value name="ZVAL"><block type="math_number" id="179"><field name="NUM">0</field></block></value><statement name="A"><block type="cube" id="180"><field name="CENTERDROPDOWN">true</field><value name="XVAL"><block type="math_number" id="181"><field name="NUM">1</field></block></value><value name="YVAL"><block type="math_number" id="182"><field name="NUM">1</field></block></value><value name="ZVAL"><block type="math_number" id="183"><field name="NUM">1</field></block></value></block></statement></block></statement><statement name="ELSE"><block type="translate" id="184"><value name="XVAL"><block type="math_number" id="185"><field name="NUM">10</field></block></value><value name="YVAL"><block type="math_number" id="186"><field name="NUM">0</field></block></value><value name="ZVAL"><block type="math_number" id="187"><field name="NUM">0</field></block></value><statement name="A"><block type="cube" id="188"><field name="CENTERDROPDOWN">true</field><value name="XVAL"><block type="math_number" id="189"><field name="NUM">2</field></block></value><value name="YVAL"><block type="math_number" id="190"><field name="NUM">2</field></block></value><value name="ZVAL"><block type="math_number" id="191"><field name="NUM">2</field></block></value></block></statement></block></statement></block></statement></block></statement></block></xml>
|