The script just shows a pallete - like for a paint program. It's a draft, and some components are overly complex or mislabeled (for example the "tri" routine actually draws polygons - sometimes triangles, sometimes hexagons). But basically, imagine a "color cube". This is a unit cube where coordinates in the cube correspond to colors. 0 0 0 is black, 1 1 1 is white, 1 0 0 is red, 0 1 0 is green and 0 0 1 is blue.
Now take this cube and rotate it so that the white/black axis is tangent to the plane defined by the screen. Then take 256 evenly spaced slices of the cube along that axis. Those slices are my "color palettes". The center slice is approximately a regular hexagon while slices towards the white and black end of the slider (I have a slider to choose which slice to display) are equilateral triangles. Everything else is just implementation. The particular bit of code we are discussing here is a part of a sorting algorithm. I generate vertex locations for all of the corners of all of those color cube slices, but the order which I generate them in is not useful for rendering them in the opengl api. So I first group them based on their position on the white/black axis and then I use the "gift wrap" convex hull algorithm to order them. I know that these points already form a convex hull - I do not need to discard any of them. So I just arbitrarily pick a point and then work through the remaining points, finding the point with the largest angle with respect to the last picked point and an arbitrary frame of reference and marking it as the next point to use. And that's what this -@^.@rms bit is doing - finding that angle. As for meaning - meaning is something we assign to observations. Whether it's useful or not depends on our tastes and goals (and this can involve a fair bit of experimentalism and thought sometimes). Thanks, -- Raul On Fri, Dec 13, 2013 at 10:09 PM, Don Kelly <d...@shaw.ca> wrote: > Thanks for this. > I won't pretend to understand the whole script at this time but it appears > that you have, an rms value 'X' (or array of such values ) for which you > want to find the logeof 1/X. > The problem that I see is thatyour rms is not the root mean square but root > (sum of squares). > If rms is intended to be root mean square then it should be (as from > previous discussion on this forum): > > > > This has been tested and works but whether it has actual meaning for complex > numbers is ??? > It could bear on something that I am interested in -fields under > transmission lines- magnitude Ok but direction is a bit questionable. > > Don > > > > > On 12/12/2013 7:42 PM, Raul Miller wrote: >> >> On Thu, Dec 12, 2013 at 10:27 PM, Don Kelly <d...@shaw.ca> wrote: >>> >>> What is the purpose of this exercise? >> >> http://jsoftware.com/pipermail/programming/2013-December/034264.html >> >> After correcting the obligatory errors, I was trying to address what >> is now the -@^.@rms part of this line: >> >> choose=: try #~ [: (= >./) -@^.@rms@(try -"1 {:@keep) >> >> Thanks, >> > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm