Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Created April 18, 2020 16:41
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/66b9a8dcd74b60f8fc06ec738ec3be6a to your computer and use it in GitHub Desktop.
Save kenwebb/66b9a8dcd74b60f8fc06ec738ec3be6a to your computer and use it in GitHub Desktop.
Wolfram Physics Project
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Sat Apr 18 2020 12:39:38 GMT-0400 (Eastern Daylight Time)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Wolfram Physics Project
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName:
Keywords:
My Notes
--------
April 18, 2020
copied from ref 3
-----------------
ResourceFunction["WolframModelPlot"][{{1, 2}, {1, 3}, {2, 3}, {4, 1}},
VertexLabels -> Automatic]
{{1, 2}, {1, 3}, {2, 3}, {4, 1}}
Graphviz
--------
digraph G {
rankdir=LR
node [shape=circle, color=black, fillcolor=steelblue3, style=filled];
//{{1, 2}, {1, 3}, {2, 3}, {4, 1}}
1 -> 2
1 -> 3
2 -> 3
4 -> 1
}
References
----------
(1) https://www.wolframphysics.org/
(2) https://www.wolframphysics.org/technical-introduction/
TECHNICAL INTRODUCTION
A Class of Models with the Potential to Represent Fundamental Physics
BY STEPHEN WOLFRAM
A class of models intended to be as minimal and structureless as possible is introduced.
The models can be viewed as describing networks, relations, sets, or a variety of other structures.
Even in cases with simple rules, highly complex behavior can emerge, some of which has striking similarities to known core features of fundamental physics.
(3) https://www.wolframphysics.org/technical-introduction/basic-form-of-models/basic-structure/
() http://webgraphviz.com/
]]></Notes>
<_-.XholonClass>
<!-- domain objects -->
<PhysicalSystem/>
<Block/>
<Brick/>
<!-- quantities -->
<Height superClass="Quantity"/>
</_-.XholonClass>
<xholonClassDetails>
<Block>
<port name="height" connector="Height"/>
</Block>
</xholonClassDetails>
<PhysicalSystem>
<Block>
<Height>0.1 m</Height>
</Block>
<Brick multiplicity="2"/>
</PhysicalSystem>
<Blockbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var a = 123;
var b = 456;
var c = a * b;
if (console) {
console.log(c);
}
//# sourceURL=Blockbehavior.js
]]></Blockbehavior>
<Heightbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var myHeight, testing;
var beh = {
postConfigure: function() {
testing = Math.floor(Math.random() * 10);
myHeight = this.cnode.parent();
},
act: function() {
myHeight.println(this.toString());
},
toString: function() {
return "testing:" + testing;
}
}
//# sourceURL=Heightbehavior.js
]]></Heightbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.Brickbehavior = function Brickbehavior() {}
$wnd.xh.Brickbehavior.prototype.postConfigure = function() {
this.brick = this.cnode.parent();
this.iam = " red brick";
};
$wnd.xh.Brickbehavior.prototype.act = function() {
this.brick.println("I am a" + this.iam);
};
//# sourceURL=Brickbehavior.js
]]></Brickbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
console.log("I'm another brick behavior");
]]></Brickbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Block</title>
<rect id="PhysicalSystem/Block" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Height</title>
<rect id="PhysicalSystem/Block/Height" 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