
I am using one script as a framework and would like to nest another script
(the same one but in a slightly different state) within the it. If I can do this it
would allow me to combine systems and begin to aggregate units within
the larger framework based on numeric node locations.
I guess the idea is to merge two graphs-similar to what Moser produced.
See attached board for script images. it is the lines on the left
I want to combine. Say...the top one within the bottom one!
4 comments:
Yo Cole,
This is one way to put two scripts together - it's pretty rudimentary, though:
1) identify (by eye if necessary with
vertex labeling on) a set of crucial connection points like:
vertices = {2,65,83,...,206}
Then make a ring out of them like:
{2->65, 65->83,83->? ...,?->206,206->2 }
Then that should be some starting data for the second system graph that you want to integrate in to your first system.
But try having the second one iterate with fractional incremenents so that there is no collision between you first graph and second graph. I'll try to put on a script later that shows this.
Basically, you are milking your first graph for start data for your second....then you join the two graphs together after all is computed out and graph the union of the two.
-Moser
hey cole, i still like the kind of miesian clarity of this. i like the spokes coming out. But what i still don't get is how the system aggregates. I know we also talked about site conditions. i think the fact that you've really looked at this in section helps massively. but overall, the question of the site still nags me.
It looks like matt has you covered, but one simple way I'd suggest is that you add numbers to one of the two graphs so that they live in different number "regions" like the first graph runs from 1-1,000, the second from 100,000-101,000. Do this by taking your first graph and adding numbers to it like so:
In[36]:= yourGraph = {{1 -> 2}, {1 -> 2}, {2 -> 1}, {3 -> 4}, {5 ->
6}};
{First[#[[1]]], Last[#[[1]]]} & /@ yourGraph
Plus[%, 100]
First[#] -> Last[#] & /@ %
Out[37]= {{1, 2}, {1, 2}, {2, 1}, {3, 4}, {5, 6}}
Out[38]= {{101, 102}, {101, 102}, {102, 101}, {103, 104}, {105, 106}}
Out[39]= {101 -> 102, 101 -> 102, 102 -> 101, 103 -> 104, 105 -> 106}
Oh, and I almost forgot then connect the parts you want like 1->101 106->4
etc.
Post a Comment