import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# Define the parameters of the Complex Intuitionistic Fuzzy Number (CIFN)
# Membership function: μ(z) = e^(-|z|^2)
# Non-membership function: ν(z) = 1 - e^(-|z|^2)
# Create a grid for the complex plane
real = np.linspace(-2, 2, 100)
imag = np.linspace(-2, 2, 100)
real_grid, imag_grid = np.meshgrid(real, imag)
z = real_grid + 1j * imag_grid # Complex numbers grid
# Define the membership and non-membership functions
membership = np.exp(-np.abs(z)**2) # Membership function
non_membership = 1 - np.exp(-np.abs(z)**2) # Non-membership function
# Plot the 3D visualization
fig = plt.figure(figsize=(14, 7))
# Membership function surface
ax1 = fig.add_subplot(121, projection='3d')
ax1.plot_surface(real_grid, imag_grid, membership, cmap='viridis', edgecolor='k')
ax1.set_title("Membership Function μ(z)", fontsize=14)
ax1.set_xlabel("Re(z)")
ax1.set_ylabel("Im(z)")
ax1.set_zlabel("μ(z)")
# Non-membership function surface
ax2 = fig.add_subplot(122, projection='3d')
ax2.plot_surface(real_grid, imag_grid, non_membership, cmap='plasma', edgecolor='k')
ax2.set_title("Non-Membership Function ν(z)", fontsize=14)
ax2.set_xlabel("Re(z)")
ax2.set_ylabel("Im(z)")
ax2.set_zlabel("ν(z)")
plt.tight_layout()
plt.show()
aW1wb3J0IG51bXB5IGFzIG5wCmltcG9ydCBtYXRwbG90bGliLnB5cGxvdCBhcyBwbHQKZnJvbSBtcGxfdG9vbGtpdHMubXBsb3QzZCBpbXBvcnQgQXhlczNECgojIERlZmluZSB0aGUgcGFyYW1ldGVycyBvZiB0aGUgQ29tcGxleCBJbnR1aXRpb25pc3RpYyBGdXp6eSBOdW1iZXIgKENJRk4pCiMgTWVtYmVyc2hpcCBmdW5jdGlvbjogzrwoeikgPSBlXigtfHp8XjIpCiMgTm9uLW1lbWJlcnNoaXAgZnVuY3Rpb246IM69KHopID0gMSAtIGVeKC18enxeMikKCiMgQ3JlYXRlIGEgZ3JpZCBmb3IgdGhlIGNvbX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