Using advances in computational geometry and collision-detection algorithms, an algorithm was developed to analyze and predict the geometrical properties of a randomly packed structure using packing objects of arbitrary shape. A 3-D polygonal model was used to describe an arbitrary complex packing object and a simple container object. The dynamics of the packing process is not simulated, but a search algorithm finds stable equilibrium positions for the packing objects of arbitrary shapes using a collision-detection algorithm in a 3-D space. A modified conjugate gradient optimization method determines the packing object's final packing location and orientation. Once the bed is packed, both macroscopic quantities like the overall porosity, the specific surface area, and the number of packing objects per unit volume and microscopic properties like the porosity variation in any direction could be determined. For accurate porosity calculation inside a given 3-D polygonal sample space, the Sutherland-Hodgman polygon clipper algorithm was used. Predicted results are validated against available experimental data for spheres, Raschig rings, Pall rings, and cascade minirings.