Statistics for Three Dimensional Modeling and a Simulation of the Shape Memory Effect