jDSGI - Java2D DATA Step Graphics Interface
  Back - Next   [ 12 of 27 ]
image  
by Richard A. DeVenezia, Copyright 2004  HOME
/*
 * Richard A. DeVenezia
 * June 1, 2004
 *
 * jDSGI test 12
 */

data _null_;

  if symexist('goutpath') then goutpath=symget('goutpath'); else goutpath=pathname('WORK');
  if symexist ('gsftype') then gsftype=symget('gsftype'); else gsftype='png';

  gsf = cats(goutPath,"\","test12");

  width  = 500;
  height = 500;

  %canvas (_g, width, height, 0ffffffx);

  %setRenderingHint ("KEY_ANTIALIASING", "VALUE_ANTIALIAS_OFF");

  saturation = .8;
  brightness = .8;

  n = 720;
  do i = 1 to n;

    hue = (i-1) / n;

    %setColorHSB (hue + 0, saturation, brightness);
    %fillArc (0,0,width,height, hue*360, 360*(1-hue));

    %getColor (c);

    * these puts will show
    * HSB selects a high and low RGB level (based on s and b)
    * and interpolates between them per hue angle;
    * angle  r g b
    *   0    h l l  g morphs to h
    *  60    h h l  r morphs to l
    * 120    l h l  b morphs to h
    * 180    l h l  g morphs to l
    * 240    l l h  r morphs to h
    * 300    h l h  b morphs to l
    * 360    h l l
    *
    *   r g b
    * 0 . + .
    * 1 - . .
    * 2 . . +
    * 3 . - .
    * 4 + . .
    * 5 . . -
    *;

    put i z3. + 1 c hex8. ;
  end;


  %canvas_saveAs (gsf, gsftype, savedAs);

  %canvas_delete();

  if savedAs ne '' then call system ("start " || savedAs);
run;