Skip to main content

Second Harmonic Generation N=1:21



gnuplot> set xrange [-180:180]
gnuplot> set yrange [-180:180]


splot sin(cos(x*pi/180))*sin(cos(x*pi/180))/(cos(x*pi/180)*cos(x*pi/180))*sin(cos(y*pi/180))*sin(cos(y*pi/180))/(cos(y*pi/180)*cos(y*pi/180))+sin(cos((x+1)*pi/180))*sin(cos((x+1)*pi/180))/(cos((x+1)*pi/180)*cos((x+1)*pi/180))*sin(cos((y+1)*pi/180))*sin(cos((y+1)*pi/180))/(cos((y+1)*pi/180)*cos((y+1)*pi/180))+sin(cos((x+2)*pi/180))*sin(cos((x+2)*pi/180))/(cos((x+2)*pi/180)*cos((x+2)*pi/180))*sin(cos((y+2)*pi/180))*sin(cos((y+2)*pi/180))/(cos((y+2)*pi/180)*cos((y+2)*pi/180))+sin(cos((x+3)*pi/180))*sin(cos((x+3)*pi/180))/(cos((x+3)*pi/180)*cos((x+3)*pi/180))*sin(cos((y+3)*pi/180))*sin(cos((y+3)*pi/180))/(cos((y+3)*pi/180)*cos((y+3)*pi/180))+sin(cos((x+4)*pi/180))*sin(cos((x+4)*pi/180))/(cos((x+4)*pi/180)*cos((x+4)*pi/180))*sin(cos((y+4)*pi/180))*sin(cos((y+4)*pi/180))/(cos((y+4)*pi/180)*cos((y+4)*pi/180)) +sin(cos((x+5)*pi/180))*sin(cos((x+5)*pi/180))/(cos((x+5)*pi/180)*cos((x+5)*pi/180))*sin(cos((y+5)*pi/180))*sin(cos((y+5)*pi/180))/(cos((y+5)*pi/180)*cos((y+5)*pi/180))+sin(cos((x+6)*pi/180))*sin(cos((x+6)*pi/180))/(cos((x+6)*pi/180)*cos((x+6)*pi/180))*sin(cos((y+6)*pi/180))*sin(cos((y+6)*pi/180))/(cos((y+6)*pi/180)*cos((y+6)*pi/180))+sin(cos((x+7)*pi/180))*sin(cos((x+7)*pi/180))/(cos((x+7)*pi/180)*cos((x+7)*pi/180))*sin(cos((y+7)*pi/180))*sin(cos((y+7)*pi/180))/(cos((y+7)*pi/180)*cos((y+7)*pi/180))+sin(cos((x+8)*pi/180))*sin(cos((x+8)*pi/180))/(cos((x+8)*pi/180)*cos((x+8)*pi/180))*sin(cos((y+8)*pi/180))*sin(cos((y+8)*pi/180))/(cos((y+8)*pi/180)*cos((y+8)*pi/180)) +sin(cos((x+9)*pi/180))*sin(cos((x+9)*pi/180))/(cos((x+9)*pi/180)*cos((x+9)*pi/180))*sin(cos((y+9)*pi/180))*sin(cos((y+9)*pi/180))/(cos((y+9)*pi/180)*cos((y+9)*pi/180))+sin(cos((x+10)*pi/180))*sin(cos((x+10)*pi/180))/(cos((x+10)*pi/180)*cos((x+10)*pi/180))*sin(cos((y+10)*pi/180))*sin(cos((y+10)*pi/180))/(cos((y+10)*pi/180)*cos((y+10)*pi/180))+sin(cos((x+11)*pi/180))*sin(cos((x+11)*pi/180))/(cos((x+11)*pi/180)*cos((x+11)*pi/180))*sin(cos((y+11)*pi/180))*sin(cos((y+11)*pi/180))/(cos((y+11)*pi/180)*cos((y+11)*pi/180))+sin(cos((x+12)*pi/180))*sin(cos((x+12)*pi/180))/(cos((x+12)*pi/180)*cos((x+12)*pi/180))*sin(cos((y+12)*pi/180))*sin(cos((y+12)*pi/180))/(cos((y+12)*pi/180)*cos((y+12)*pi/180))+sin(cos((x+13)*pi/180))*sin(cos((x+13)*pi/180))/(cos((x+13)*pi/180)*cos((x+13)*pi/180))*sin(cos((y+13)*pi/180))*sin(cos((y+13)*pi/180))/(cos((y+13)*pi/180)*cos((y+13)*pi/180)) +sin(cos((x+14)*pi/180))*sin(cos((x+14)*pi/180))/(cos((x+14)*pi/180)*cos((x+14)*pi/180))*sin(cos((y+14)*pi/180))*sin(cos((y+14)*pi/180))/(cos((y+14)*pi/180)*cos((y+14)*pi/180))+sin(cos((x+15)*pi/180))*sin(cos((x+15)*pi/180))/(cos((x+15)*pi/180)*cos((x+15)*pi/180))*sin(cos((y+15)*pi/180))*sin(cos((y+15)*pi/180))/(cos((y+15)*pi/180)*cos((y+15)*pi/180))+sin(cos((x+16)*pi/180))*sin(cos((x+16)*pi/180))/(cos((x+16)*pi/180)*cos((x+16)*pi/180))*sin(cos((y+16)*pi/180))*sin(cos((y+16)*pi/180))/(cos((y+16)*pi/180)*cos((y+16)*pi/180))+sin(cos((x+17)*pi/180))*sin(cos((x+17)*pi/180))/(cos((x+17)*pi/180)*cos((x+17)*pi/180))*sin(cos((y+17)*pi/180))*sin(cos((y+17)*pi/180))/(cos((y+17)*pi/180)*cos((y+17)*pi/180))+sin(cos((x+18)*pi/180))*sin(cos((x+18)*pi/180))/(cos((x+18)*pi/180)*cos((x+18)*pi/180))*sin(cos((y+18)*pi/180))*sin(cos((y+18)*pi/180))/(cos((y+18)*pi/180)*cos((y+18)*pi/180))+sin(cos((x+19)*pi/180))*sin(cos((x+19)*pi/180))/(cos((x+19)*pi/180)*cos((x+19)*pi/180))*sin(cos((y+19)*pi/180))*sin(cos((y+19)*pi/180))/(cos((y+19)*pi/180)*cos((y+19)*pi/180)) title 'SHG for N=20'        
gnuplot> splot sin(cos(x*pi/180))*sin(cos(x*pi/180))/(cos(x*pi/180)*cos(x*pi/180))*sin(cos(y*pi/180))*sin(cos(y*pi/180))/(cos(y*pi/180)*cos(y*pi/180))+sin(cos((x+1)*pi/180))*sin(cos((x+1)*pi/180))/(cos((x+1)*pi/180)*cos((x+1)*pi/180))*sin(cos((y+1)*pi/180))*sin(cos((y+1)*pi/180))/(cos((y+1)*pi/180)*cos((y+1)*pi/180))+sin(cos((x+2)*pi/180))*sin(cos((x+2)*pi/180))/(cos((x+2)*pi/180)*cos((x+2)*pi/180))*sin(cos((y+2)*pi/180))*sin(cos((y+2)*pi/180))/(cos((y+2)*pi/180)*cos((y+2)*pi/180))+sin(cos((x+3)*pi/180))*sin(cos((x+3)*pi/180))/(cos((x+3)*pi/180)*cos((x+3)*pi/180))*sin(cos((y+3)*pi/180))*sin(cos((y+3)*pi/180))/(cos((y+3)*pi/180)*cos((y+3)*pi/180))+sin(cos((x+4)*pi/180))*sin(cos((x+4)*pi/180))/(cos((x+4)*pi/180)*cos((x+4)*pi/180))*sin(cos((y+4)*pi/180))*sin(cos((y+4)*pi/180))/(cos((y+4)*pi/180)*cos((y+4)*pi/180)) +sin(cos((x+5)*pi/180))*sin(cos((x+5)*pi/180))/(cos((x+5)*pi/180)*cos((x+5)*pi/180))*sin(cos((y+5)*pi/180))*sin(cos((y+5)*pi/180))/(cos((y+5)*pi/180)*cos((y+5)*pi/180))+sin(cos((x+6)*pi/180))*sin(cos((x+6)*pi/180))/(cos((x+6)*pi/180)*cos((x+6)*pi/180))*sin(cos((y+6)*pi/180))*sin(cos((y+6)*pi/180))/(cos((y+6)*pi/180)*cos((y+6)*pi/180))+sin(cos((x+7)*pi/180))*sin(cos((x+7)*pi/180))/(cos((x+7)*pi/180)*cos((x+7)*pi/180))*sin(cos((y+7)*pi/180))*sin(cos((y+7)*pi/180))/(cos((y+7)*pi/180)*cos((y+7)*pi/180))+sin(cos((x+8)*pi/180))*sin(cos((x+8)*pi/180))/(cos((x+8)*pi/180)*cos((x+8)*pi/180))*sin(cos((y+8)*pi/180))*sin(cos((y+8)*pi/180))/(cos((y+8)*pi/180)*cos((y+8)*pi/180)) +sin(cos((x+9)*pi/180))*sin(cos((x+9)*pi/180))/(cos((x+9)*pi/180)*cos((x+9)*pi/180))*sin(cos((y+9)*pi/180))*sin(cos((y+9)*pi/180))/(cos((y+9)*pi/180)*cos((y+9)*pi/180))+sin(cos((x+10)*pi/180))*sin(cos((x+10)*pi/180))/(cos((x+10)*pi/180)*cos((x+10)*pi/180))*sin(cos((y+10)*pi/180))*sin(cos((y+10)*pi/180))/(cos((y+10)*pi/180)*cos((y+10)*pi/180))+sin(cos((x+11)*pi/180))*sin(cos((x+11)*pi/180))/(cos((x+11)*pi/180)*cos((x+11)*pi/180))*sin(cos((y+11)*pi/180))*sin(cos((y+11)*pi/180))/(cos((y+11)*pi/180)*cos((y+11)*pi/180))+sin(cos((x+12)*pi/180))*sin(cos((x+12)*pi/180))/(cos((x+12)*pi/180)*cos((x+12)*pi/180))*sin(cos((y+12)*pi/180))*sin(cos((y+12)*pi/180))/(cos((y+12)*pi/180)*cos((y+12)*pi/180))+sin(cos((x+13)*pi/180))*sin(cos((x+13)*pi/180))/(cos((x+13)*pi/180)*cos((x+13)*pi/180))*sin(cos((y+13)*pi/180))*sin(cos((y+13)*pi/180))/(cos((y+13)*pi/180)*cos((y+13)*pi/180)) +sin(cos((x+14)*pi/180))*sin(cos((x+14)*pi/180))/(cos((x+14)*pi/180)*cos((x+14)*pi/180))*sin(cos((y+14)*pi/180))*sin(cos((y+14)*pi/180))/(cos((y+14)*pi/180)*cos((y+14)*pi/180))+sin(cos((x+15)*pi/180))*sin(cos((x+15)*pi/180))/(cos((x+15)*pi/180)*cos((x+15)*pi/180))*sin(cos((y+15)*pi/180))*sin(cos((y+15)*pi/180))/(cos((y+15)*pi/180)*cos((y+15)*pi/180))+sin(cos((x+16)*pi/180))*sin(cos((x+16)*pi/180))/(cos((x+16)*pi/180)*cos((x+16)*pi/180))*sin(cos((y+16)*pi/180))*sin(cos((y+16)*pi/180))/(cos((y+16)*pi/180)*cos((y+16)*pi/180))+sin(cos((x+17)*pi/180))*sin(cos((x+17)*pi/180))/(cos((x+17)*pi/180)*cos((x+17)*pi/180))*sin(cos((y+17)*pi/180))*sin(cos((y+17)*pi/180))/(cos((y+17)*pi/180)*cos((y+17)*pi/180))+sin(cos((x+18)*pi/180))*sin(cos((x+18)*pi/180))/(cos((x+18)*pi/180)*cos((x+18)*pi/180))*sin(cos((y+18)*pi/180))*sin(cos((y+18)*pi/180))/(cos((y+18)*pi/180)*cos((y+18)*pi/180))+sin(cos((x+19)*pi/180))*sin(cos((x+19)*pi/180))/(cos((x+19)*pi/180)*cos((x+19)*pi/180))*sin(cos((y+19)*pi/180))*sin(cos((y+19)*pi/180))/(cos((y+19)*pi/180)*cos((y+19)*pi/180))+sin(cos((x+20)*pi/180))*sin(cos((x+20)*pi/180))/(cos((x+20)*pi/180)*cos((x+20)*pi/180))*sin(cos((y+20)*pi/180))*sin(cos((y+20)*pi/180))/(cos((y+20)*pi/180)*cos((y+20)*pi/180)) title 'SHG for N=21' 

Comments

Popular posts from this blog

NEWTON-RAPSON METHOD-8th degree Legendre polynomial

## Newton-Rapson Method to the smallest non negative root
## of the 8th degree Legendre Polynomial
## P8(x)=(1/128)(6435x^8-12012x^6+6930x^4-1260x^2+35)
## where -1<=x<=1.
## for the smallest non negative root, we can ignore
## all the terms except the last two by truncated
## the function to be zero and find
## x=0.167 as the initial smallest non negative
## root.
##Constants and initializations
x=[]; ## Empty array for the iterated x roots
x(1)=0.16700000; ## Initial guess to begin the iteration for the
## smallest non-negative root.
L8=[]; ## Empty array for the Legendre polynomial
L8p=[]; ## Empty array for the derivative of the Legendre polynomial
for i=1:100
##The value of the function at x
L8(i)=(1/128)*(6435*x(i)^8-12012*x(i)^6+6930*x(i)^4-1260*x(i)^2+35);
##The value of the derivative of the function at x
L8p(i)=(1/128)*(6435*8*x(i)^7-12012*6*x(i)^5+6930*4*x(i)^3-1260*2*x(i));
x(i+1)=x(i)-L8(i)/L8p(i); ## the iteration
endfor
## For plot let's define a new variable…

Second Harmonic Generation

gnuplot> set xrange [-180:180] gnuplot> set yrange [-180:180] gnuplot> set pm3d gnuplot> set hidden3d  gnuplot> set title 'SHG' gnuplot> splot sin(cos(x*pi/180))*sin(cos(x*pi/180))/(cos(x*pi/180)*cos(x*pi/180))*sin(cos(y*pi/180))*sin(cos(y*pi/180))/(cos(y*pi/180)*cos(y*pi/180)) title 'N=1
'