Temporary furniture for the national centre for contemporary arts "Arsenal", bar, N. Novgorod, design: Shorina D., Brosalin K., visualization: Kuryanova E., 2015
but the order in which K gets changed is the same order that all of the other lists get changed.
For example (I'm not at a PC with Rhino/GH so I can't post an example directly) You want to order a cloud of points from the bottom up, i.e. by Z lowest to highest. Using the PComp component to decompose a point into its separate x, Y and Z components you can plug the Z output into K of the Sort Component. Sort will then re-order the Z values from lowest to highest, but the points you wish to order haven't be changed only a list of numbers. So you can plug the points into A and they will be reordered into the same lowest to highest order that the Z component was changed to.
Similarly if each of these points had a label that you wished to be attached to it at a latter point in the definition the list would no longer be in the same sequence. For instance if the original list was ordered in the X axis from 1 to 20 with one being the closest point to X = 0 and 20 being the furthest. Since you have rearranged the points, their labels are now 1 is the lowest and 20 is the highest, but we want them to remain the same as before with 1 being the closest to X=0. This is where the extra inputs on the Sort Component come in. Plug the list into B.
K is ordered smallest number to largest number
A is ordered lowest point to highest point
B is ordered so that 1 remains closest point to X=0 and 20 is furthest from X=0 …
ce type 'Illustrator.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{95CD20AA-AD72-11D3-B086-0010A4F5C335}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
-K
…
Grasshopper are drawn just like that, except there's indeed a special case for the X and Y axes. If you keep it within a loop I suppose it would look something like this:
Dim extent As Integer = 4
For k As Int32 = -extent To extent
If (k = 0) Then
'Draw short gridlines
args.Display.DrawLine(P.PointAt(-extent, k), P.PointAt(0, k), C) args.Display.DrawLine(P.PointAt(k, -extent), P.PointAt(k, 0), C)
'Draw axes
args.Display.DrawLine(P.PointAt(0, k), P.PointAt(extent, k), DarkRed, 2) args.Display.DrawLine(P.PointAt(k, 0), P.PointAt(k, extent), DarkGreen, 2)
Else
args.Display.DrawLine(P.PointAt(-extent, k), P.PointAt(extent, k), C) args.Display.DrawLine(P.PointAt(k, -extent), P.PointAt(k, extent), C)
End IfNext
--
David Rutten
david@mcneel.com
Poprad, Slovakia…