Answer To: prohibition-Not use the class construct to define objects you require in your program-Only use the...
Sathishkumar answered on Oct 26 2021
import math
N=50 #No of divisions
H=40
out=90
dwl=30
RTN=120
ofst=0
ft=90-ofst
sd=ft-out
td=sd-dwl
fth=td-RTN
h=H*0.5
A=[]
B=[]
A3=[]
B3=[]
t1=[]
n_d=0
val=1.83673469
def fun_linspac(N,out,n_d,t1,val):
for x in range(0,N):
if x==N-1:
t1.append(out)
else:
t1.append(n_d)
n_d+=val
return t1
def fun_linspac1(N,out,n_d,t1,val):
for x in range(0,N):
if x==N-1:
t1.append(out)
else:
t1.append(n_d)
n_d-=val
return t1
def fun_linspac2(N,out,n_d,t1,val):
for x in range(0,N):
if x==N-1:
t1.append(0)
else:
t1.append(n_d)
n_d-=val
return t1
t1=fun_linspac(N,out,n_d,t1,val)
ran=[]
n_d=270
for x in range(0,N):
if x==N-1:
ran.append(out)
else:
ran.append(n_d)
n_d-=(val*2)
def fun_calcultion(N,ran,h,H,A,A3):
for x in range(0,N):
a1=math.sin(math.radians(ran[x]))
a2=h*a1
if a2<0:
a=a2+h
a3=a+H
elif a2>=0:
a=a2+h
a3=a+H
A.append(a)
A3.append(a3)
return A,A3
A,A3=fun_calcultion(N,ran,h,H,A,A3)
t2=[]
n_d=out+dwl
out1=out+dwl+RTN
t2=fun_linspac(N,out1,n_d,t2,val)
n_d=90
ran1=[]
ran1=fun_linspac(N,270,n_d,ran1,val*2)
B,B3=fun_calcultion(N,ran1,h,H,B,B3)
step=10
xtc=[]
m=int((out+dwl+RTN+10)/step)
for x in range(m):
v=x*step
xtc.append(v)
step=5
xtc1=[]
m=int((H+5)/step)
for x in range(m):
v=x*step
xtc1.append(v)
#print(A)
nt=[]
mat1=[]
mat2=[]
def cos_fun(cc1,A3,mat1):
for i in range(len(cc1)):
...