@@ -0,0 +1,1434 @@
+#!/usr/bin/env python%0A %0Aimport numpy as np%0Afrom mpl_toolkits.mplot3d import Axes3D%0Aimport matplotlib.pyplot as plt%0A%0A# This code plot the horizontal illuminance inside a room using a SISO array.%0A%0A# Semi-angle at half illuminance (degree)%0AtethaHalf = 70%0A%0A# Lambertian emission order (adimensional)%0Am = -np.log(2)/np.log10(np.cos(np.deg2rad(tethaHalf)))%0A%0A# Center luminous intensity (cd)%0AI0 = 0.73%0A%0A# Room's dimensions%0AdimZ = 3%0AdimX = 5%0AdimY = dimX%0A%0A# LED's position%0Axt = dimX*0.5%0Ayt = dimY*0.5%0A%0A# Grid number in the receiver plane%0Angx = dimX*10%0Angy = dimY*10%0A%0A# Generate the grid vectors%0Ax = np.linspace(0,dimX,ngx)%0Ay = np.linspace(0,dimY,ngy)%0A%0A# Distance between the transmitter and receiver plane (m)%0Aht = 3%0Ahr = 0.85%0Ahtr = ht - hr%0A%0A# Numbers of LEDs per array%0AnLed = 60%0A%0A# Generate the receiver plane based on grid vectors%0A%5Bxr, yr%5D = np.meshgrid(x,y)%0A%0A# Create a zero matrix to store values of horizontal iluminance%0AE = np.zeros((ngx,ngy))%0A%0A# Distance vector from source to receiver plane%0Ad = np.sqrt(np.square(xr-xt) + np.square(yr-yt) + np.square(htr))%0A%0A# Cos(tetha)%0AcosTetha = htr/d%0A%0A# Get individual horizontal illuminace per LED%0AE = (I0*(cosTetha)**(m+1) )/np.square(d) %0A%0A# Get the horizontal illuminance per LED array%0AE = E*nLed*nLed%0A%0Afig = plt.figure()%0AfigE = fig.add_subplot(111, projection='3d')%0AfigE.plot_surface(x,y,E)%0AfigE.set_xlabel('X (m)')%0AfigE.set_ylabel('Y (m)')%0AfigE.set_zlabel('Horizontal Illuminance')%0A%0Aplt.show()

Create code to plot Horizontal Illuminance.