Re: grid plot
- To: mathgroup at smc.vnet.net
- Subject: [mg5800] Re: [mg5777] grid plot
- From: Allan Hayes <hay at haystack.demon.co.uk>
- Date: Wed, 22 Jan 1997 00:44:10 -0500
- Sender: owner-wri-mathgroup at wolfram.com
et476 at cleveland.Freenet.Edu (Hai Q. Nguyen)
[mg5777] grid plot
>I wonder if it's possible to connect the following pattern
>of points(defined by their x,y,z coordinates) with
>straight lines :
>
>a b c d e....m
>
>n o p q r....t
>
>u v w x y....z
>
>Point "o" for example will have 4 straight lines connecting
>it to neighboring points n,b,p, and v. Boundary points
>like point "a" will have 2 lines connecting to "b" and "n".
Hai:
Here is a technique that may help
(dat = {{a,b,c,d},{e,f,g,h},{i,j,j,l}})//TableForm
a b c d
e f g h
i j j l
upddown = MapThread[T, {Drop[dat,-1],Drop[dat,1]}, 2]//MatrixForm
T[a, e] T[b, f] T[c, g] T[d, h]
T[e, i] T[f, j] T[g, j] T[h, l]
leftright = MapThread[T,
{Drop[Transpose[dat],-1],Drop[Transpose[dat],1]}, 2]//
Transpose//MatrixForm
T[a, b] T[b, c] T[c, d]
T[e, f] T[f, g] T[g, h]
T[i, j] T[j, j] T[j, l]
Allan Hayes
hay at haystack.demon.co.uk
http://www.haystack.demon.co.uk