Studio/Gallery

Here are some examples and useful links for J graphics.

  1. viewmat
  2. plot
  3. image3
  4. opengl
  5. Gallery of Fractals, Chaos and Symmetry
  6. Rope Editor Plus
  7. Turtle Geometry
  8. Diffusion-Limited Aggregation

viewmat

Viewmat is a viewer for matrix data, including bitmap files.

  Y=: 3&#. ^:_1 i.243
  (255 255 0,0 0 255,:192 128 0) viewmat Y +./ . *. |: Y

scar1.png

plot

Plot is a general purpose plotting package. For example:

  'key sin(exp),cos(exp)' plot (;(sin,:cos)@:^) -: >: i:3j100 

sincosexp1.png

The same plot can be done (in J 6) with function plotting (see system/extras/help/user/plot_function.htm):

  'key sin(exp),cos(exp)' plot _1 2;'sin@:^`cos@:^' 

More plot examples.

image3

The image3 package provides utilities for accessing 24-bit jpeg, png, bmp, tga and portable anymaps from J.

prevare1.png

opengl

J has a complete interface to OpenGL, and allows direct calls to the underlying API. Here is a buckyball.

bball.jpg

More opengl examples.

Gallery of Fractals, Chaos and Symmetry

This is Cliff Reiter's [WWW] page with most of the graphics written in J. Here is a Voronoi tiling;

th_sier_til

More Fractals Visualization examples.

Rope Editor Plus

This is Norm Johnson's Lightwave [WWW] plugin that does the calculations in J, see [JForum]forum announcement.

Rope_Editor_In_Action

Turtle Geometry

The J [JSvnSystem]turtle script was contributed by Fraser Jackson, and has commands for turtle geometry and some extensions to simplify references to cartesian points, or points along a path. You can think of it as a turtle that remembers where it has been.

The following example uses the ability to capture numbered points and and then apply some J tools to display a rosette defined as joining all points on a regular polygon with all its chords. The four lines do the following:

  1. create a set of numbered points

  2. create a function to draw lines between points

  3. create a function to join a point to all the others

  4. join each point to all the others and display the graph

  show repeat 20;'point (n =: n+1) fd 1 rt 18'[n=: _1 
  to 'goreturn a b';'goto b goto a'
  to 'goreturnall a'; 'goreturn for a,.i.20'
  show goreturnall for i.20

turtle.png

Diffusion-Limited Aggregation

dla_polar.png

See Diffusion-Limited Aggregation.

last edited 2007-10-08 01:21:07 by RicSherlock