function plotLaserdiode(ax1,omega,phi,kappa,position)

%% Sardemann, IPF, TU Dresden, 2022


RLaser = eul2rotm([kappa,phi,omega],'ZYX');

% plot zylinder with orientation of laser
[xcylinder,ycylinder,zcylinder] = cylinder(3);
hcylinder = 20;
cylinderRotated = [[RLaser,position];[0,0,0,1]]*[xcylinder(:)';ycylinder(:)';zcylinder(:)'*hcylinder;ones(1,numel(xcylinder))];
surfCylinder = surf(ax1,reshape(cylinderRotated(1,:),2,size(cylinderRotated,2)/2),...
    reshape(cylinderRotated(2,:),2,size(cylinderRotated,2)/2),...
    reshape(cylinderRotated(3,:),2,size(cylinderRotated,2)/2));
surfCylinder.EdgeColor = 'none';
surfCylinder.FaceColor = 'g';
end

