ABSTRACT: This paper presents a generalized algorithm for the generation of realistic numerical representation of three-dimensional rock mass. In the rock mass model, the discontinuities, which can be finite or infinite, planar or non-planar, convex or concave in shape, include deterministic discontinuities obtained directly from field survey and stochastic discontinuities generated by Monte Carlo simulations. In order to generate the realistic rock mass model, one domain of interest is generated first; then the rock mass profile is formed, which are represented by triangulated surfaces or general polygons. Finally, by inputting all the discontinuities either planar or non-planar, the three dimensional rock mass can be obtained. In the resultant blocky system, the blocks can be of any arbitrary shape. Therefore the generated model is much more realistic when it is used for deformation, stability, fluid flow and/or coupled analysis.