that 2++K (per M2 !!!) appears reasonable to him (it's a matter of perspective I guess).
That said term planar glazing these days doesn't necessarily mean ... er ... planar class. Anyway the above is probably the best for you: primary tubes (edges), secondary tubes (short paths), Karma (a must) plus the cheapo glass > job done > never again. …
t sure about my decision.
Let's take a look at the method <createPopulation>:
public static List<List<Point3d>> createPopulation(List<Point3d> cP, int populationCount)
{
List<List<Point3d>> Population = new List<List<Point3d>>(); // 1
for(int i = 0; i < populationCount; i++) //2
{
List<Point3d> individual = cP.ToList(); // 3
Population.Add(individual); // 4
System.Security.Cryptography.RNGCryptoServiceProvider provider = new System.Security.Cryptography.RNGCryptoServiceProvider();
int n = Population[i].Count;
while (n > 0)
{
byte[] box = new byte[1];
do provider.GetBytes(box); // 5
while (!(box[0] < n * (Byte.MaxValue / n)));
int k = (box[0] % n);
n--;
Point3d value = Population[i][k];
Population[i][k] = Population[i][n];
Population[i][n] = value;
}
}
In my algorithm there are lots of declarations like: List<Point3d> = new List<Point3d>(); or Random r = new Random(); these are constant time O(1) right?
i = 0 executes once; i < populationCount executes (N+1) times; i++ N times
this executes M times? because every point needs to be added individually?
this one I don't really know; at msdn it is stated: If P:System.Collections.Generic.List`1.Count is less than P:System.Collections.Generic.List`1.Capacity, this method is an O(1) operation. If the capacity needs to be increased to accommodate the new element, this method becomes an O(n) operation, where n is P:System.Collections.Generic.List`1.Count. Shouldn't it be O(N), because I am adding every individual separately?
can't find any statements about this one either, I am guessing it should be of constant time O(1), because just one random number is being generated?
…
taTree.
2. Since GH is acyclic by design we can't pick individually (without code, that is) our "picks" for the iceberg ... thus we need a global policy applied to ALL grid points at once.
3. This is what the next part does: it picks randomly some iceberg stuff and modifies their Z by a random value. If the Z is always "above" the grid or not it depends upon the domain of values to operate. Seed means "roll the bones again" (meaning another collection).
4. So we have the modified points Data Tree (that are steady - acting as the tips of the iceberg). Let's call them Anchors.
5. If we subtract set 4 from 1 we have the points prone to vary according some manipulation. Kangaroo does that manipulation (this is the best add-on that GH has to offer by 1M miles made by a very clever fella).
6. But if we instruct Kangaroo to do the job... he makes chaos since the points in 4 are not sufficient: we need perimeter steady points that act as Anchors as well. So we manage some logic to pick a variable set of perimeter points and we "merge" 4 and 6 and we have the final set of Anchors on hand - whilst all the rest are points willing to change.
7. Kangaroo is a physics engine meaning that the only thing that understands is ... er ... points and their relation (the "line" connecting them, that is). Kinda like a CPU that understands 0 and 1 and nothing else.
8. So we provide Kangaroo info about all the lines involved: how "stiff" they are and what is the expected/desired final length.
9. By double clicking the Kangaroo component ... the "simulation" starts running (in some kind of "loops") and goes towards an "equilibrium" where all our desires are satisfied - or the solution's entropy is the minimum possible (well up to some level, he he). Kangaroo displays a small control dialog that allows you to halt the process or reset it (meaning: start again).
10. If the instructions are "good"/"proper" the "loops" (iterations) are relatively few: if K does 1M "loops" ... this means that your instructions are silly or not well thought.
After stopping Kangaroo ... we have (hopefully) a "well" distorted collection of points (and their equivalent mesh) to proceed further via components usually found in the WB add-on
PS: If all the above sound Greek to you ... it's because I'm Greek, he he.
Moral: Get the gist of Kangaroo ASAP - worth spending some time I recon. If you do that and you need examples (other than the ones available at download time) ... well I have more than 300 (from simple to ultra paranoid).…
its neighbouring surfaces and try to find the surface in between to begin orienting the data in a grid. The polysurface I am using is such that all surfaces will only ever have a maximum of 4 neighbouring surfaces. My code so far is:
Dim intTree As New DataTree (Of Integer)
intTree = convertTree(y, z, x)
'create a tree for storing common adjacencies
Dim commonAdj As New dataTree (Of Integer)
'need a loop to run through in appropriate order. for now just use very first value
'get list of all adjacencies for first surface
Dim branch As New GH_Path(0)
Dim srfListA As New list(Of Integer)
srfListA = intTree.Branch(branch)
'get first adjacency, again, eventually will need a loop
Dim tempInt As Integer = srfListA(0)
'get the list of first surfaces adjacencies
Dim branch1 As New GH_Path(tempInt)
Dim srfListB As New list(Of Integer)
srfListB = intTree.Branch(branch1)
'find shared adjacencies, first find out how many to check, START FROM 1 BECAUSE I AM USING 0 FOR TEST
For i As Integer = 1 To srfListA.count() - 1
'Get a list Of Each adjacency
Dim branch2 As New GH_Path(srfListA(i))
Dim srfListC As New list(Of Integer)
srfListC = intTree.Branch(branch2)
'loop through each new srf List
For j As Integer = 0 To srfListC.count() - 1
For k As Integer = 0 To srfListB.count() - 1
If (srfListB(k) = srfListC(j)) Then
'we have a shared point, need to store indexes i and k?
'need to make sure we place surfaces in correct orientation?
End If
Next
Next
Next
a = commonAdj
Any suggestions for where to go from here? I think I am getting bogged down in the complexity.…
create 2 or more closed polyline as result of offseting the initial closed polyline curve by extracting the brep from subsurfaces i generated from the initial
surface. i threw ramdom numbers for the offest values, at these breps. but at the output of the curve offset component listed it all as a data tree with a single N value (only 1 list index). what happened was
for all the breps, it generated additional list,but an additional branch. can i ask for some possible solution.
was actually tring to make a surface planar for these curves for each brep, from the result of the offsetting. but it cannot because all the data branch has only one(1) data list.
thanx,
r i k i…
f is "@" to stand for assign but I still don't like that in case of (a). Also @user seems to be established in meta sense.
It seems to be gaining speed :) Thank you for your help and thank K for her linguistic prowess. When will we hear from the owl herself? Or is she trying to stay sanitized to stay on top of her game for the Help Topics…
ationalization.
It's quite fast (1000 points in cloud = 1.1 sec, amd x6), accepts multiple branches/hulls, most complex math operation is sqrt(2) :) , and its really simple to use (one input, one output) ;)
…