made resolution a parameter when drawing in 3d