image thumbnail

Kolam Generator

by

 

30 Apr 2012 (Updated )

This suite of functions can be used to generate geometric line drawing of Kolams.

draw_kolam(M,clr)
function draw_kolam(M,clr)

load kolam_data
if nargin==1
    clr='b';
end
[m n]=size(M);
M=M(end:-1:1,:);
for i=1:m
    for j=1:n
        if M(i,j)>0
            this=pt{M(i,j)};
            plot(j+real(this),i+imag(this),clr,'Linewidth',1.5)
            hold on
            plot(j,i,[clr '.'])
            hold on
        end
    end
end
axis equal
axis off

Contact us