Studio/Viewmat

From J Wiki
Jump to navigation Jump to search

The viewmat utility and related utilities viewrgb and viewbmp will display a matrix of data. viewmat is documented by the viewmat lab, available from the J system main menu under Studio...|Labs...|Viewmat .

Some examples in the wiki:

Base Spectrum
I Ching ideogram builder

Hilbert's Peano (space-filling) curve:

   require 'viewmat'
   hp=: 3 : '(|.,]) 1 (0 _2 _2 ,&.> _2 _1 0 + #y) } (,.|:) y'
   MG=: 256 #. 128 0 128,:0 192 0
   viewrgb 2 ([ # #"1) MG {~ hp ^:6 [ 0, 0 1 0 ,: 0

Hp1.png

   require 'trig'
   viewmat (*:@sind +/ *:@cosd) i.360

Sctab1.png

See Also