ches it with the first branch in Tree B (and then the first branch in Tree C if more than two trees are involved).
I'm planning to add better branch matching logic, but I'm not going to touch it until I have a good idea about what's needed and how it can be accomplished without breaking existing files.
So, the branch "address" is only used to sort the branches in a single tree. Thus, a tree with the following branches is always sorted in the exact same way:
{0;0}
{0;1}
{0;2}
{0;3;0}
{0;3;1}
{1;6}
If you have another tree with different branches:
{0}
{1}
{2}
{3}
{4}
{5}
Then the matching will be:
{0;0} -> {0}
{0;1} -> {1}
{0;2} -> {2}
{0;3;0} -> {3}
{0;3;1} -> {4}
{1;6} -> {5}
As long as people adhere to your advice: "it is best for the addresses of each tree branch to be in the same format", there will be no problem. But it is at the moment extremely difficult to perform complex matchings.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 9:25am on August 11, 2010
oning behind using the equality component to test for even numbers is flawed because of the data matching used by gh. It is testing like this:
0==0 True
2==1 False
4==2 False
6==3 False
etc
.............
Where as a Modulo 2 would work like this
0%2 = 0
1%2 = 1
2%2 = 0
3%2 = 1
4%2 = 0
5%2 = 1
6%2 = 0
7%2 = 1
8%2 = 0
9%2 = 1
......
Also I notice you have some errors in your expressions producing Nulls.
If you want it to be twice the value then you should have 2*D in the Expression and 10*D in the other
....
I attach a working version.…
ment is always at parameter 0 and last element at parameter 1, so if my parameters "t" are: (0, 0, 1, 1, 1)
my output list will be simply: (6, 6, 10, 10, 10)
but if I send a series of parameters like: (0, 0.25, 0.5, 0.75, 1)
the output will be: (6, 7, 8, 9, 10)
a linear interpolation between 6 and 10.
With more than 2 values in "D", the type of interpolation can change the output, see this:
and for block (blue) and cubic (magenta/pink) type the results would be like this:
Note that I just built points with a sequence of number in X and interpolated datas to Y (see again definition) to have a graphical support for this "explanation".
"Interp" component give as output the same type of objects as you give as input, number>number, integer>integer, even directly point>point (!) and so on...
(P.S. as can you see, I've prepass values to a "number" component before the "D" of "Interp" component; this because "Interp" component doesn't automatically convert text to number.)
Hope my english dont hurt you :P
bye
maje…
ep is to understan the logics of what you want to do, in your case, build 4 point surfaces (u also need to know the right direction to build the surfaces). Then you can write an hipotetic list (by hand in a paper) of what you want. In your case the list was (0, 1, 3, 2) (2, 3, 5, 4) (4, 5, 7, 6), etc... if you can imagine building 2 lists, each one with the sequences (0, 2, 4, 6, etcc) and (1, 3, 5, 7, etc..) then you can manage with shift and graft to finally have four lists. A( 0 1 2 3 ...) B (1 3 5 etc..) C(3 5 7 etc..) D (2 4 6 etc..). And to achieve the 2 first lists, you need to get the odd and the pair numbers. The cull pattern does that amazingy well. With a pattern True-False you get de pair numbers, and with the False-True pattern you get de odd numbers.
Hope it was clear enough…
Added by Pep Tornabell at 5:32am on November 19, 2009
t, let's talk about randomness. Randomness is a problem in computing because digital computers are deterministic. If you give them the exact same instructions they always end up with the exact same result. It turns out to be mathematically impossible to generate true random numbers using a digital computer, but it is fairly easy to generate pseudo-random numbers. This is actually not bad news as pseudo-random numbers -unlike real random numbers- can be generated again and again and you'll end up with the same random numbers every time. Being able to get the same random numbers on demand increases the reliability of these number sequences which in turn makes them easier to use.
Pseudo-random numbers are numbers that have certain characteristics. Note that when we talk about random numbers we are really talking about numbers. Plural. It's easy to generate only a single one, as xkcd so eloquently put it:
So what are these characteristics that define pseudo-randomness? Without being actually correct, I can sum them up as follows:
The sequence of generated numbers should never repeat itself*
The numbers in the sequence ought to be spread evenly across the numeric domain**
There are a lot of different algorithms out there, some better than others, some faster than others, some solving very specific problems while others are more generic. The generator used in Grasshopper is the standard Microsoft .NET Random, based on Donald Knuth's subtractive algorithm.
So let's imagine we want random integers between 0 and 10. What would a bad random sequence look like?
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 (about as bad as it gets)
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 (not random at all)
1 3 2 5 3 9 1 2 4 2 5 1 1 2 8 1 5 2 3 4 (too many low numbers)
2 8 4 6 0 9 8 2 4 8 6 4 2 2 5 1 4 8 6 2 (too many even numbers)
So what about good sequences? Well, here's a few:
6 9 1 2 0 4 2 8 5 7 2 9 1 9 2 5 3 1 9 2 (sure, why not)
6 2 5 3 4 1 9 7 8 0 2 1 6 4 5 8 9 5 0 9 (looks about right)
1 8 5 2 3 4 5 7 9 5 2 1 0 2 1 0 9 7 6 4 (I suppose)
9 0 6 4 8 3 1 5 2 7 6 1 4 6 0 1 9 7 5 6 (whatever)
There are a lot of valid pseudo-random sequences. (Seriously, loads). So even if we have a good pseudo-random generator we may be given a random sequence that isn't entirely to our liking. The shorter the sequence we need, the more likely it is that statistical aberrations invalidate that particular sequence for us. What we need is some control over the generator so we don't just get a repeatable sequence, but a repeatable sequence we actually like.
Enter seed values. The random generator requires a seed value before it can generate a random sequence. These seed values are always integers, and they can be any valid 32-bit integer. Every unique seed value results in the same sequence. Every time.
Unfortunately there is no clear relationship between seeds and sequences. Changing the seed value from 5 to 6 will result in a completely difference random sequence, and two sequences that are very similar may well have to wildly different seeds. There is therefore no way to guess a good seed value, it is completely trial-and-error. Also because of this extremely discontinuous nature, you cannot use tools like Galapagos to optimize a seed value.
If you are looking for a pseudo-random sequence which has custom characteristics, you may well end up having to write your own generator algorithm. Ask questions about this on the Grasshopper main forum or the VB/C# forum.
Conclusion: Seed values are integers that define the exact sequence of pseudo-random numbers, but there's no way of knowing ahead of time what sequence it will be and there's no way of tweaking a sequence by slightly changing the seed. Even the tiniest change in seed value will result in a radically different random sequence.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
* This is not actually possible. A finite amount of numbers always repeats itself eventually.
** This should only be true for long enough sequences, short sequences are allowed to cluster their values somewhat.
Interesting links for further reading:
Coding Horror: Computers are Louse Random Number Generators
StackOverflow: When do random numbers start repeating?…
Added by David Rutten at 9:52am on October 20, 2012
uld be much better than Rhino at huge mesh collections. I'd personally try free Autodesk Meshmixer and ZBrush first but most designers are more familiar with rendering programs like Maya or 3DS Max. I'm not familiar enough with architecture to suggest a list as only Revit and Sketchup come to mind.
Looking more closely, CAD Exporter is only for 2D curves and points, how silly, and it requires baked geometry in a Rhino layer:
I could write a Python script to export an STL but that would be a large ascii format file instead of binary. Better to use OBJ to retain quad faces, too.
Ah, well, OBJ files are also ascii format when exported from Rhino, so it would be quite easy to make a script to export those directly to disk from Grasshopper. Here is one box, 10X10X20 in size, with quad faces:
# Rhino
o object_1v 10 10 20v 10 10 0v 10 0 20v 10 0 0v 0 10 20v 0 10 0v 0 0 20v 0 0 0f 5 7 3 1f 5 6 8 7f 3 7 8 4f 2 4 8 6f 5 1 2 6f 3 4 2 1
If I have time I'll make a little script to write such OBJ files unless you can find a native Grasshopper plugin for direct OBJ export in full 3D for meshes.…
etc.
Group 2 - 1, 6, 11, 16, 21 etc.
Group 3 - 2, 7, 12, 17, 22 etc.
Group 4 - 3, 8, 13, 18, 23 etc.
Group 5 - 4, 9, 14, 19, 24 etc. "
except in data, the branches start at 0, so 'group 1' is branch 0
as for the order of your points, that depends on the input prior sorting...
yrs …
x and min values for x,y,z and calculate energy for each optionand collect these results in excel sheet ...
option No. x y z Annual coiling demand(by DIva)
1 10 10 10
2 10 15 20
3 11 10 19
4 12 14 17
5 15 16 15
6 16 11 14
7 18 12 12
.
.
etc
Regards ...
hossam
Hossam.wefki@gmail.com…
branches in each A's list of B's, or remove its ends etcso that if I want to remove the last B in every A{0;1},{0;2},{0;3},{0;4},{0;5},{0;6}{1;1},{1;2},{1;3},{1;4}{2;1},{2;2},{2;3},{2;4},{2;5}would become{0;1},{0;2},{0;3},{0;4},{0;5}
{1;1},{1;2},{1;3}
{2;1},{2;2},{2;3},{2;4}I guess the question is do I need to figure out the cull pattern- each B may have different lengths...…
1
condition: largest number<max length
then the packing would look something like this:
1 |4 |5 |7 |2
9 |6 |5 |3 |2
|5
|1
sums|10|10|10|10|10 => 100% efficiency
And the algorithm is:
1.Place first number(x=1)
2.Calculate the rest(R) in this row(10-1=9)
3.Search for closest x <= than R
3.1 If x=R -> place that number -> end of cycle
3.2 If x<=R -> place that number -> return to 2.
3.3 If x=null -> end of cycle
Something like this.
Can this be classified as brute force?
…
Added by Artyom Maxim at 11:08am on March 19, 2013