w list should contain a smallest value of the values with the same index. I should keep order of the indexes.
For example, item [21] of the 1st branch = 1, item [21] of the 2nd branch = 2, so item [21] in the resulting list = 1.
Any advise?…
circles that can be populated (for each radius size) is set as an integer (or slider)
(ie. radius 1.5 = 10 , radius 3= 6, radius 6 = 6, radius 9=4)
Conditions are:
1) Each of the circle has a radius of influence,
Radius of influence = double the radius of the circle)
(3, 6, 12, 18)
2) Any overlapping circles in either: Radius of influence or the Circles are removed so that
No circles overlap.
3) There must also be 4 circles set at the corner points of the grid - These must be circles with a radius of 3 or 6
If you can do that I will be amazed as i've been trying for weeks! :(
Ive attached a sketch of what im looking for…
Integer = 0 To 9
val *= 2
lst.Add(val)
Next
Since val is a ValueType, when we assign it to the list we actually put a copy of val into the list. Thus, the list contains the following memory layout:
[0] = 2
[1] = 4
[2] = 8
[3] = 16
[4] = 32
[5] = 64
[6] = 128
[7] = 256
[8] = 512
[9] = 1024
Now let's assume we do the same, but with OnLines:
Dim ln As New OnLine(A, B)
Dim lst As New List(Of OnLine)
For i As Integer = 0 To 9
ln.Transform(xform)
lst.Add(ln)
Next
When we declare ln on line 1, it is assigned an address in memory, say "24 Bell Ave." Then we modify that one line over and over, and keep on adding the same address to lst. Thus, the memory layout of lst is now:
[0] = "24 Bell Ave."
[1] = "24 Bell Ave."
[2] = "24 Bell Ave."
[3] = "24 Bell Ave."
[4] = "24 Bell Ave."
[5] = "24 Bell Ave."
[6] = "24 Bell Ave."
[7] = "24 Bell Ave."
[8] = "24 Bell Ave."
[9] = "24 Bell Ave."
To do this properly, we need to create a unique line for every element in lst:
Dim lst As New List(Of OnLine)
For i As Integer = 0 To 9
Dim ln As New OnLine(A, B)
ln.Transform(xform)
lst.Add(ln)
Next
Now, ln is constructed not just once, but whenever the loop runs. And every time it is constructed, a new piece of memory is reserved for it and a new address is created. So now the list memory layout is:
[0] = "24 Bell Ave."
[1] = "12 Pike St."
[2] = "377 The Pines"
[3] = "3670 Woodland Park Ave."
[4] = "99 Zoo Ln."
[5] = "13a District Rd."
[6] = "2 Penny Lane"
[7] = "10 Broadway"
[8] = "225 Franklin Ave."
[9] = "420 Paper St."
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 6:26am on September 9, 2010
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
des]. I have 5-variables with 4 options each (a total of 4x4x4x4x4 = 1024 variations):
Height: 6,7,8 & 9 ft
Depth inside: 1, 2, 3 & 4 ft
Depth outside: 1, 2, 3 & 4 ft
Rotation outside: 0, 15, 30 & 45 degree
Rotation inside: 0, 15, 30 & 45 degree
I do not see convergence yet (see attached). The last combination of variables say 9-ft high, 4-ft deep (inside & outside) and 0-deg rotation (horizontal) inside and outside. Is this the optimized value of the light shelf parameters for the best illumination level at the sensor plane for that specific place, time and date?
Shamim.…
Added by Shamim Javed at 1:01pm on November 3, 2013
e
7. True
8. True <-- this one
9. True
10. False
11. True
12. False
13. True
14. True <-- this one
15. True
16. False
17. True
18. False
19. True
20. True <-- this one
21. True
22. False
23. True
24. False
25. True
26. True <-- this one
27. True
28. False
29. True
30. False
31. True
32. True <-- this one
33. True
Any idea how I can solve this?
Thanks!…
and Ronnie of StudioMode and David Fano of DesignReform will also be attending.
RSVP has been closed on this event. Space is limited to 50 people. Please attend if you do RSVP.
Agenda -
12:00-1:00 Arrival, informal discussion
1:00 - 1:15 Introductions
1:15 - 2:00 Project presentation 1 (30 minutes + 15 min QA) - David Lee - Clemson - 3D pattern environments using volumetric proxies.
2:00 - 2:45 Project Presentation 2 (30 minutes + 15 min QA) - P. Casey Mahon - Organic Abstractions (30 minutes + 15 min QA)
2:45 - 3:45 David Rutten - New work in GH (30 min QA)
3:45 - 4:30 Sameer Kumar AIA - KPF - Project presentation 3 (30 minutes + 15 min QA)
4:30 - 5:15 Chris Wilkins - Clemson - Urban Renewal and parametric urban development studies in Grasshopper.
5:15 - 6:00 David Rutten - Scripting in GH (15 min QA)
After 6:00 conversations may move down the street for more discussion.
If you would like to present your project at the Cloud please email: scottd@mcneel.com…