4-parameter constructor for shapes