A three-dimensional model to simulate jointnetworks in layered rocks