Andrew your patterns are delightful. Several years ago I tried to sell the
idea of a GRB palette omsteaad pf the traditional RGB palette.
I rotated your first palette (I found it in Cliff's book). If you think of it
as a clock, and consider an hour around the faceof the clock, my two GRB
palettes range in value from light to dark.
Since Green is brighter than Red, this is a much better palette to correspond
images to the grayscale image.
Maybe you'll discpver some interesting images with this palette.
require 'viewmat'
at2=: 13 :'([:{:"1 *.) j./"1 y'
RGB=: 255* #:i.8
GRB=:1 0 2{"1 RGB
we=: 13 :'<.0++/"1[0.3 0.59 0.11*"1 y'
gray=: 13 :'3#"0 we y'
RGB viewmat (D=.at2"0 /~ i:500)
GRB viewmat (D=.at2"0 /~ i:500)
(gray RGB) viewmat (D=.at2"0 /~ i:500)
(gray GRB) viewmat (D=.at2"0 /~ i:500)
(Another good JHS exercise)
Linda
-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf
Of Andrew Nikitin
Sent: Tuesday, April 11, 2017 11:39 AM
To: J programming
Subject: [Jprogramming] Complex functions visualization
I read a book "Visual Complex Functions" by Elias Wegert.
In it autor argues for so called phase portraits as a good way to visualize
complex function of one complex variable. Each function value is represented by
a pixel with a hue (which is an angular quantity) equal to function value's
phase angle. He argues that the result provides a lot of information about
function and even allows to restore analytic functions (up to a constant).
The other 2 components of the colorspace, saturation and light, can be used to
show lines of equal phase and equal magnitude. Author calls it "enhanced phase
portrait". Interesting, that there is no level tracing. Lines appear as a
byproduct of using a modified hue palette.
I put up a script and couple of sample images on wiki. 'sq' utility generates
unit square of complex numbers. Evaluate your choice of function on it and
color each pixel with ccEnhPh and you have yourself a phase portrait to view
with viewmat or save with writebmp.
http://code.jsoftware.com/wiki/User:Andrew_Nikitin/Phase_portraits
I think that if you like pretty pictures (and want to get some insight on
complex function behavior), this technique provides a lot of bang for a very
little buck.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm