কেবলমাত্র আরও কিছু চিন্তা যুক্ত করা যা অন্যকে অনিয়মিত ডোমেন প্রকারের সমস্যাগুলিতে সহায়তা করতে পারে। এমন পরিস্থিতিতে যেখানে ব্যবহারকারীর কাছে তিনটি ভেক্টর / তালিকাগুলি রয়েছে, x, y, z রয়েছে এমন একটি 2D সমাধানের প্রতিনিধিত্ব করে যেখানে z একটি আয়তক্ষেত্রাকার গ্রিডে উপরিভাগ হিসাবে প্লট করা উচিত, আর্টিফিক্সআর দ্বারা 'প্লট_ট্রিসুরফ ()' মন্তব্যগুলি প্রযোজ্য। অনুরূপ উদাহরণ কিন্তু অ আয়তক্ষেত্রাকার ডোমেন সহ:
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
# problem parameters
nu = 50; nv = 50
u = np.linspace(0, 2*np.pi, nu,)
v = np.linspace(0, np.pi, nv,)
xx = np.zeros((nu,nv),dtype='d')
yy = np.zeros((nu,nv),dtype='d')
zz = np.zeros((nu,nv),dtype='d')
# populate x,y,z arrays
for i in range(nu):
for j in range(nv):
xx[i,j] = np.sin(v[j])*np.cos(u[i])
yy[i,j] = np.sin(v[j])*np.sin(u[i])
zz[i,j] = np.exp(-4*(xx[i,j]**2 + yy[i,j]**2)) # bell curve
# convert arrays to vectors
x = xx.flatten()
y = yy.flatten()
z = zz.flatten()
# Plot solution surface
fig = plt.figure(figsize=(6,6))
ax = Axes3D(fig)
ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0,
antialiased=False)
ax.set_title(r'trisurf example',fontsize=16, color='k')
ax.view_init(60, 35)
fig.tight_layout()
plt.show()
উপরের কোডটি উত্পাদন করে:

তবে এটি সমস্ত সমস্যার সমাধান করতে পারে না, বিশেষত যেখানে অনিয়মিত ডোমেইনে সমস্যা সংজ্ঞায়িত করা হয়। এছাড়াও, যেখানে ডোমেনের এক বা একাধিক অবতল অঞ্চল রয়েছে, সেখানে ডেলাউন ট্রায়াঙ্গুলেশনের ফলে ডোমেনের বহিরাগত উত্সাহী ত্রিভুজ তৈরি হতে পারে। এই ধরনের ক্ষেত্রে, সঠিক পৃষ্ঠের উপস্থাপনা অর্জনের জন্য এই দুর্বৃত্ত ত্রিভুজগুলি ত্রিভুজ থেকে সরানো উচিত। এই পরিস্থিতিতে, ব্যবহারকারীর স্পষ্টভাবে ডেলাউন ট্রায়াঙ্গুলেশন গণনা অন্তর্ভুক্ত করতে হবে যাতে এই ত্রিভুজগুলি প্রোগ্রামগতভাবে মুছে ফেলা যায়। এই পরিস্থিতিতে, নিম্নলিখিত কোডটি পূর্বের প্লট কোডটি প্রতিস্থাপন করতে পারে:
import matplotlib.tri as mtri
import scipy.spatial
# plot final solution
pts = np.vstack([x, y]).T
tess = scipy.spatial.Delaunay(pts) # tessilation
# Create the matplotlib Triangulation object
xx = tess.points[:, 0]
yy = tess.points[:, 1]
tri = tess.vertices # or tess.simplices depending on scipy version
#############################################################
# NOTE: If 2D domain has concave properties one has to
# remove delaunay triangles that are exterior to the domain.
# This operation is problem specific!
# For simple situations create a polygon of the
# domain from boundary nodes and identify triangles
# in 'tri' outside the polygon. Then delete them from
# 'tri'.
# <ADD THE CODE HERE>
#############################################################
triDat = mtri.Triangulation(x=pts[:, 0], y=pts[:, 1], triangles=tri)
# Plot solution surface
fig = plt.figure(figsize=(6,6))
ax = fig.gca(projection='3d')
ax.plot_trisurf(triDat, z, linewidth=0, edgecolor='none',
antialiased=False, cmap=cm.jet)
ax.set_title(r'trisurf with delaunay triangulation',
fontsize=16, color='k')
plt.show()
উদাহরণস্বরূপ প্লটগুলি সমাধান সমাধানের নীচে নীচে দেওয়া হয়েছে 1) মজাদার ত্রিভুজগুলি সহ এবং 2) যেখানে সেগুলি সরানো হয়েছে:


আমি আশা করি উপরোক্ত সমাধানের ডেটাতে উপস্থাপূর্ণ পরিস্থিতিযুক্ত লোকদের জন্য সহায়ক হতে পারে।