----------
2;0
0
d
1
e
2
f
Path Mapper have a very interesting behavior, sometimes speed up things really easy.
(I've used the -1 to make paths start from 0 instead than from 1, with an input tree with 0 length branches or minimum branches length = 2 you will need to edit that)
:D
…
rns 10,000. That is 10 cubed.
As it stands Pow returns A to the power of B+1 for any B value 0 and greater. For B values of -1 or less it gives A to the power of 1.
Thanks,
Steven…
Added by Steven Hall at 5:56pm on September 7, 2010
output: 0, 1, 3, 6, 10, 14, 17I have a basic understanding of programming and can understand vb.net better than I can write it. Any help would be greatly appreciated!ThanksJeff…
and B inputs. This gives the odd results. I replaced the B Panel with an integer slider and the Pow component works properly.
When I use a Panel for B I get the following results (A panel is 10):
B=0 R=10
B=1 R=100
B=2 R=10,000
B=3 R=100,000,000…
Added by Steven Hall at 7:38pm on September 7, 2010
Not looking extensively at the code, try:
aa = minx + sx * num.Next(1, 10) / 10
dd = miny + sy * num.Next(1, 10) / 10
cc = minz + sz * num.Next(1, 10) / 10
also, there is specific vb/c# forum...
, but at the lowest level computers only manipulate ones-and-zeros according to exact and unambiguous rules. As a result of this it is actually impossible to generate true random numbers using a computer. Computers use algorithms that create sequences of pseudo random numbers, numbers that appear to be random, but in fact are created by the application of a deterministic algorithm.
One of the major benefits of pseudo random numbers over actual random numbers is that it's easy to reproduce a sequence of numbers. If you generate the first 50 numbers in the pseudo-random sequence with seed=5 they will be exactly the same as when you did it last week. If you want different random numbers, you have to use a different seed. In Grasshopper I thought it important that the same random numbers are always generated, as that minimizes the 'surprise'. However, since the default numbers might not be to your liking, you can always play around with the seed value until you find a pseudo random sequence that suits you.
If you generate 8 random numbers between 1 and 10, you might get a sequence like this:
{5, 8, 2, 4, 2, 7, 3, 10}
The pseudo random number generator guarantees that the spread of the numbers in the sequence is equal everywhere, but only when you generate an infinite amount of numbers. Since every sequence you care to generate in one human lifetime will not be infinite, there will always be some 'clumping' of values. A small stretch along the number line that is somewhat more densely populated by random numbers than the adjacent stretch.
There is also absolutely no guarantee that you won't get the same number more than once. Obviously this is impossible if you were to generate 50 values between 1 and 10 (there are only 10 possible unique numbers), but even if you generate only 2 values between 1 and 10 you might still get the same number twice.
Indeed in my example above the value 2 occurs twice, whereas the value 1 doesn't occur at all. If you want a range of numbers without overlaps, it's better to not use the Random component, but instead generate all the numbers using a Range or Series component and then Jitter the list, thus randomizing the order of the values, but not the values themselves.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…