source files: [cx]lsp.[ch]
This operator gives pointwise operations access to the array indices of the elements on which they operate. For example, if the graphic-relation in question is 100x100x100, and the element currently being operated on is the 12,34,67th element, then
would return 12,
would return 34
would return 67, and any other choice of <dimension> would trigger an error.
A quick way to generate a square grid of points is:
(setq checkerboard (send class-graphic-relation :new '(100 100))) (send checkerboard-relation :pointwise-eval '(progn (setq :POINT-X (float (index 0))) (setq :POINT-Y (float (index 1))) (setq :POINT-Z 0)))
See also ROW-MAJOR-INDEX.