Related Experiment Video
Updated: Apr 23, 2026

Detection and Quantification of Tunneling Nanotubes Using 3D Volume View Images
Published on: August 31, 2022
3D visualization of graphene and carbon nanotubes using Python: a study
Ashutosh Sharma1, Sanjeev Kumar1, Kuldeep Kumar2
1Department of Physics, R. K. (PG) College Shamli, M. S. University, Saharanpur, UP, 247776, India.
Context:
The accurate visualization and modeling of nanostructures, such as carbon nanotubes (CNTs) and graphene play a crucial role in advancing nanoscale research and applications. The versatile properties of graphene and CNTs make them fashionable among the scientific community. Modeling and simulation play an important role in understanding and predicting the behavior of these nanomaterials. Traditional modeling approaches often rely on specialized software and complex computational methods. However, the advent of versatile programming languages like Python has opened new avenues for simulating and visualizing nanostructures. Python's extensive libraries and user-friendly syntax make it an attractive tool for researchers aiming to model CNTs and graphene structures. The study demonstrated 3D visualization of graphene and two configurations of CNTs, namely single-walled carbon nanotubes (SWCNTs) and multi-walled carbon nanotubes (MWCNTs) marvelously using Python-based libraries. The Python codes of 3D nanostructure models advance the nanoscale research.
Method:
The present study investigates the potential and limitations of Python-based libraries with a primary focus on Mayavi and PyVista for rendering and analyzing these nanostructures, while Mayavi offers a high-level 3D visualization interface built on visualization toolkit (VTK). The attempts to generate structurally accurate CNTs and graphene lattices revealed several critical challenges, including improper bonding representation, lattice distortions, and scaling inconsistencies. Moreover, the study presents the implementation strategies, code structure, and visual output limitations encountered during the modeling process. To provide a comparative landscape, additional tools such as Matplotlib (for 2D visualization), VPython (for quick atomic modeling), and atomic simulation environment (ASE) are briefly evaluated. The study also describes the role of NumPy, SciPy, and Pymatgen in computational geometry, structural logic, and periodic boundary condition (PBC) modeling.
Related Concept Videos
Graphing the Wave Function
Three-Dimensional Analysis of Strain
Velocity and Position by Graphical Method

