The generalized Sylvester’s and orchard problems via discriminantal arrangement | Synapse