From: Jean V.G on
I have a series of images ( 20 × 10 pixels) that I want to display in
a 'rainbow' shape. I've done a model to show what I am trying to do
(see code below). Of course I will need to do some transformations on
the images also. My idea was to index each polygon and then insert
each image into one of the polygons. But I don't know how to get
started! Can anybody help me in getting started with a data structure
that I could use or if there is a better way to achieve that?


% Arc 1
N = 10;
r = linspace(2.7,3,N);
th = linspace(pi,0,N);
[R,TH] = meshgrid(r,th);
[X,Y] = pol2cart(TH,R);
axis equal;
plot(X(:,1),Y(:,1),'r')
hold on
plot(X(:,N),Y(:,N),'r')

for index = 1:N
xcor=[X(index,1) X(index,N)];
ycor=[Y(index,1) Y(index,N)];
plot(xcor,ycor,'r')
end

% Arc 2
N = 9;
r = linspace(2.1,2.6,N);
th = linspace(pi,0,N);
[R,TH] = meshgrid(r,th);
[X,Y] = pol2cart(TH,R);
hold on
plot(X(:,1),Y(:,1),'b')
hold on
plot(X(:,N),Y(:,N),'b')
for index = 1:N
xcor=[X(index,1) X(index,N)];
ycor=[Y(index,1) Y(index,N)];
plot(xcor,ycor,'b')
end

% Arc 3
N = 7;
r = linspace(1.3,2.0,N);
th = linspace(pi,0,N);
[R,TH] = meshgrid(r,th);
[X,Y] = pol2cart(TH,R);
hold on
plot(X(:,1),Y(:,1),'c')
hold on
plot(X(:,N),Y(:,N),'c')
for index = 1:N
xcor=[X(index,1) X(index,N)];
ycor=[Y(index,1) Y(index,N)];
plot(xcor,ycor,'c')
end

% Arc 4
N = 5;
r = linspace(0.6,1.1,N);
th = linspace(pi,0,N);
[R,TH] = meshgrid(r,th);
[X,Y] = pol2cart(TH,R);
hold on
plot(X(:,1),Y(:,1),'y')
hold on
plot(X(:,N),Y(:,N),'y')

for index = 1:N
xcor=[X(index,1) X(index,N)];
ycor=[Y(index,1) Y(index,N)];
plot(xcor,ycor,'y')
end

axis equal;
From: ImageAnalyst on
Maybe you should use maketform() and tformfwd() to warp your images
into the required shape and location in your larger output canvass.