implemented both mesh generation and one sample inference. Need to test them