Design, develop and implement recursively subdivide a tetrahedron to form 3D sierpinski gasket. The number of recursive steps is to be specified by the user
Algorithm:Step 1: Specify the four vertices that form a tetrahedronStep 2: Input the number of subdivisions n.Step 3: Select any three vertices that form one of the triangular faces of…