Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Last active July 26, 2017 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/d5c2b8f98a8f51213f07c03e5ac3ba53 to your computer and use it in GitHub Desktop.
Save kenwebb/d5c2b8f98a8f51213f07c03e5ac3ba53 to your computer and use it in GitHub Desktop.
little 2-cubes operad E2 - IFLang 5
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Wed Jul 26 2017 16:03:07 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: little 2-cubes operad E2 - IFLang 5
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: d5c2b8f98a8f51213f07c03e5ac3ba53 based on 80b443bc08d84a2ae4ebe83405a48e3f
Keywords:
My Notes
--------
July 26, 2017
Use the IFLang smash command to remove the inner rectangles in the BuildingInstruction, and the outer rectangles in the BuildingBlocks.
References
----------
(1) http://math.mit.edu/~dspivak/informatics/Matriarch_ACS_BMSE.PDF
Figure 2. Architecture of rectangle arrangements. Equivalent to an early
example of an operad from mathematics called the little 2-cubes operad
E2. In the terminology of this paper, the only building blocks in E2 are
rectangles. A building instruction in E2 is an arrangement of nonoverlapping
rectangles within a larger rectangle. In the composition, the placements and
aspect ratios of building blocks are retained, but sizes can change. The
operad E2 is the mathematical description of rectangle configurations as
they are nested into hierarchies of arbitrary depth. The operad underlying
Matriarch is far more complex than E2, with more diverse building blocks
and building instructions.
]]></Notes>
<_-.XholonClass>
<PhysicalSystem/>
<Rectangle/>
</_-.XholonClass>
<xholonClassDetails>
<Avatar><Color>rgba(255,215,0,0.8)</Color></Avatar>
</xholonClassDetails>
<PhysicalSystem xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- this is the building instruction -->
<BuildingInstruction>
<Rectangle roleName="Ψ">
<Rectangle roleName="1"/>
<Rectangle roleName="2"/>
<Rectangle roleName="3"/>
<Rectangle roleName="4"/>
</Rectangle>
</BuildingInstruction>
<BuildingBlocks>
<Rectangle roleName="Ψ1">
<Rectangle roleName="1"/>
</Rectangle>
<Rectangle roleName="Ψ2">
<Rectangle roleName="1"/>
<Rectangle roleName="2"/>
</Rectangle>
<Rectangle roleName="Ψ3">
<Rectangle roleName="1"/>
<Rectangle roleName="2"/>
</Rectangle>
<Rectangle roleName="Ψ4">
<Rectangle roleName="1"/>
<Rectangle roleName="2"/>
</Rectangle>
</BuildingBlocks>
<Avatar><![CDATA[
script;
exit;
build "<Animate selection='#xhgraph'/>";
enter;
enter buildingBlocks;
take *rectangle;
prev;
enter;
enter 1;
drop;
smash *rectangle;
exit;
smash 1;
exit;
next;
take *rectangle;
prev;
enter;
enter 2;
drop;
smash *rectangle;
exit;
smash 2;
exit;
next;
take *rectangle;
prev;
enter;
enter 3;
drop;
smash *rectangle;
exit;
smash 3;
exit;
next;
take *rectangle;
prev;
enter;
enter 4;
drop;
smash *rectangle;
exit;
smash 4;
exit;
exit;
exit;
take animate;
exit;
]]></Avatar>
</PhysicalSystem>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Building Instruction</title>
<rect id="PhysicalSystem/BuildingInstruction" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Building Blocks</title>
<rect id="PhysicalSystem/BuildingBlocks" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment