.1), 3.0, 3.5}
The number of different items within a tolerance of 0.5 is 3 since
{ (1.0, 1.1, 1.2), (2.0, 2.1), (3.0, 3.5) }
Can we achieve this in gh? using sets? without using python component.
…
Added by Abir Acharjee at 1:33pm on November 17, 2014
the # of input items with that value.
so if i gave the pie chart a list like this:
1.0
4.5
4.5
0.0
4.5
7.0
0.0
the two output lists would be:
0.0 - 2
1.0 - 1
4.5 - 3
7.0 - 1
GH must be doing this calculation, otherwise how would it build the graph?…
hich are integers between 0 and 255 each) to XYZ which could be any floating point values, is as follows:
Dim factor As Double = 1.0 / 127.5 x = (colour.R * factor) - 1.0 y = (colour.G * factor) - 1.0 z = (colour.B * factor) - 1.0
So if a colour channel has the lowest value of 0, the corresponding coordinate will be -1.0. If the channel has the highest value of 255, the coordinate will be +1.0. In the case of [255,161,161] it does:
Dim factor As Double = 1.0 / 127.5x = (255 * factor) - 1.0 which equals 1.0y = (161 * factor) - 1.0 which equals 0.262745 (rounded to 6 decimal places)z = (161 * factor) - 1.0 which equals 0.262745
So the length of the vector with these xyz coordinates is:
SquareRoot of (1.0² + 0.262745² + 0.262745²) which equals 1.066803 (rounded again)
It also follows the largest possible length of a vector created this way is the Square root of 3, which roughly equals 1.732050
This conversion works both ways incidentally, so as long as you convert unitized vectors into colours you'll always get a non-clipped result.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
…
example 10.5 is exactly halfway or at 50%, 12 is at 200%, 5 is at -500%. If you were to remap these values into the other domain, their percentages ought to remain the same, ie.:
10.5 = 50% becomes 0 (because 0 halfway -100 to 100)
12 = 200% becomes 300
5 = -500% becomes -1100
The most common use of Remap Numbers is to change a set of measurements to be within a given goal domain. For example if you measure brightnesses using the Image Sampler, you get values between 0.0 (black) and 1.0 (white). However these brightnesses are supposed to control rotational angles between 10 and 45 degrees. Thus, you use a Remap component with the source domain (0.0 to 1.0) and the target domain (10 to 45).…
t means only one input and only one output. So in that case (which probably won't happen) I can output a list of text "(1.0 to 3.5) = 12", which can then be reversed engineered back into domains and integers by text operations.
…