There are two set of points
p={{5,2,0,1},{4,3,0,1},{4,2,0,2},{4,1,1,2},{3,4,1,0},{3,1,3,1},{3,1,1,3},{2,5,1,0},{2,4,2,0},{2,1,4,1},{2,0,4,2},{1,4,2,1},{1,3,3,1},{1,3,1,3},{1,2,1,4},{1,0,5,2},{1,0,4,3},{0,2,2,4},{0,1,3,4},{0,1,2,5}};
q={{8,0,0,0},{0,8,0,0},{0,0,8,0},{0,0,0,8},{7,1,0,0},{7,0,1,0},{7,0,0,1},{1,7,0,0},{1,0,7,0},{1,0,0,7},{0,7,1,0},{0,7,0,1},{0,1,7,0},{0,1,0,7},{0,0,7,1},{0,0,1,7},{6,2,0,0},{6,0,2,0},{6,0,0,2},{2,6,0,0},{2,0,6,0},{2,0,0,6},{0,6,2,0},{0,6,0,2},{0,2,6,0},{0,2,0,6},{0,0,6,2},{0,0,2,6},{6,1,1,0},{6,1,0,1},{6,0,1,1},{1,6,1,0},{1,6,0,1},{1,1,6,0},{1,1,0,6},{1,0,6,1},{1,0,1,6},{0,6,1,1},{0,1,6,1},{0,1,1,6},{5,3,0,0},{5,0,3,0},{5,0,0,3},{3,5,0,0},{3,0,5,0},{3,0,0,5},{0,5,3,0},{0,5,0,3},{0,3,5,0},{0,3,0,5},{0,0,5,3},{0,0,3,5},{5,2,1,0},{5,2,0,1},{5,1,2,0},{5,1,0,2},{5,0,2,1},{5,0,1,2},{2,5,1,0},{2,5,0,1},{2,1,5,0},{2,1,0,5},{2,0,5,1},{2,0,1,5},{1,5,2,0},{1,5,0,2},{1,2,5,0},{1,2,0,5},{1,0,5,2},{1,0,2,5},{0,5,2,1},{0,5,1,2},{0,2,5,1},{0,2,1,5},{0,1,5,2},{0,1,2,5},{5,1,1,1},{1,5,1,1},{1,1,5,1},{1,1,1,5},{4,4,0,0},{4,0,4,0},{4,0,0,4},{0,4,4,0},{0,4,0,4},{0,0,4,4},{4,3,1,0},{4,3,0,1},{4,1,3,0},{4,1,0,3},{4,0,3,1},{4,0,1,3},{3,4,1,0},{3,4,0,1},{3,1,4,0},{3,1,0,4},{3,0,4,1},{3,0,1,4},{1,4,3,0},{1,4,0,3},{1,3,4,0},{1,3,0,4},{1,0,4,3},{1,0,3,4},{0,4,3,1},{0,4,1,3},{0,3,4,1},{0,3,1,4},{0,1,4,3},{0,1,3,4},{4,2,2,0},{4,2,0,2},{4,0,2,2},{2,4,2,0},{2,4,0,2},{2,2,4,0},{2,2,0,4},{2,0,4,2},{2,0,2,4},{0,4,2,2},{0,2,4,2},{0,2,2,4},{4,2,1,1},{4,1,2,1},{4,1,1,2},{2,4,1,1},{2,1,4,1},{2,1,1,4},{1,4,2,1},{1,4,1,2},{1,2,4,1},{1,2,1,4},{1,1,4,2},{1,1,2,4},{3,3,2,0},{3,3,0,2},{3,2,3,0},{3,2,0,3},{3,0,3,2},{3,0,2,3},{2,3,3,0},{2,3,0,3},{2,0,3,3},{0,3,3,2},{0,3,2,3},{0,2,3,3},{3,3,1,1},{3,1,3,1},{3,1,1,3},{1,3,3,1},{1,3,1,3},{1,1,3,3},{3,2,2,1},{3,2,1,2},{3,1,2,2},{2,3,2,1},{2,3,1,2},{2,2,3,1},{2,2,1,3},{2,1,3,2},{2,1,2,3},{1,3,2,2},{1,2,3,2},{1,2,2,3},{2,2,2,2}}
Note that the sum of coordinates of points in a point set is 8. How to determine which points in q are in the convex hull of p?
isextreme[pts_, i_]andmsgsandisinside[hull_, p_]do? – user64494 May 02 '23 at 18:53LinearOptimization::nsolcnorLinearOptimization::evcnstr2}. – user64494 May 02 '23 at 19:48msgs = {LinearOptimization::nsolc, LinearOptimization::evcnstr2};? TIA. I prefer arguments and formulas over emotional words. ` – user64494 May 02 '23 at 20:03LinearOptimizationcan fail to find a solution if the point is outside the feasible region. That's theLinearOptimization::nsolc. AlsoLinearOptimization::evcnstr2is another message it can raise, caused by a failure to meet the constraints due to precision issues. Further down you'll see aCheckwhere if any of themsgsare raised during theLinearOptimization, then it will returnFalse(unable to determine if the point is inside the hull), otherwise I returnTrue(it's inside the hull or on the boundary). – flinty May 02 '23 at 20:15ConvexHullRegionandDelete,Pick[q,RegionMember@ConvexHullRegion[Delete[#,1]&/@p]/@(Delete[#,1]&/@q)], the result is same as yours. But if I useDelete[#,2]&andDelete[#,4]&, the result is incorrect. So I can‘t guarantee the correctness of this method. – lapcal May 03 '23 at 03:29NullSpace[p]is empty so there isn't some lower dimensional subspace you can project your points onto without losing information. – flinty May 03 '23 at 10:26