clear all; close all;hold on;
om=0:pi/128:2*pi;

zero_angle=0.8;
amplitude=1;
zero1=amplitude*(exp(i*zero_angle*pi));
zero2=-1;
%zero3=(0.99*zero1)
zero3=1/(0.99*zero1);
%zero3=0.99*conj(zero1);
%zero3=1/(0.99*conj(zero1));
plot( [zero1 zero2 zero3 ], 'or','LineWidth',3,'Markersize',10);
plot(real(exp(i*om)),imag(exp(i*om)));
grid on; axis([-3  3  -3  3])

figure;hold on;
om=0:pi/128:2*pi;
Hom1=1-zero1./exp(i*om);
%Hom1=(1-zero1./exp(i*om)) .* (1-conj(zero)./exp(i*om))
plot(om,abs(Hom1),'green');
%plot(om,unwrap(angle(Hom1)),'red')
Hom2=(1-zero2./exp(i*om));
%Hom2=(1+1./exp(i*om)) .*  (1+1./exp(i*om))
plot(om,abs(Hom2),'black');
%plot(om,unwrap(angle(Hom2)),'black')

%****SAME 
%Hom3=1-zero3./exp(i*om);
%****NON causal
%Hom3=1- (1/zero3) .* exp(i*om)
%****Double zeros
Hom3=(1-1./(zero3.*exp(i*om)))  .* (1-1./(conj(zero3).*exp(i*om)))

plot(om,abs(Hom3),'blue');
%plot(om,unwrap(angle(Hom3)),'blue')