function [X1,Y1,Z1] = cyl2( v,w )
% x y z coordinates of cylinder in direction v, weight w
[X,Y,Z] = cylinder(.1.*sqrt(w).*ones(10,1),10);
newX = [Z(:),X(:),Y(:)] * genrotmat(v)';
X1 = reshape(newX(:,2), size(X));
Y1 = reshape(newX(:,3), size(X));
Z1 = reshape(newX(:,1), size(X));
end

