Question: How ro resolve this conflict?

Hi, 

I found that using the packages heometry and simplex in the same worksheet (only one restart at the top of it) causes a conflict in the command simplex:-convexhull(`some set of points`, option = area).

It seems that Maple doesn't confounds  that area in the option=area  with geometry:-area
Is it possible to fix this?


 

restart:

L := { [0,0], [1/2,1/2], [1,1], [2,0], [1,0], [1,1/2] };
simplex:-convexhull(L, 'output'='area');

{[0, 0], [1, 0], [1, 1], [1, 1/2], [2, 0], [1/2, 1/2]}

 

1

(1)



Use of package geometry
 

restart

with(geometry):

triangle(T, [point(A,0,0), point(B,2,0), point(C,1,3)]):  # just an example

L := { [0,0], [1/2,1/2], [1,1], [2,0], [1,0], [1,1/2] };
simplex:-convexhull(L);
simplex:-convexhull(L, 'output'='area');

{[0, 0], [1, 0], [1, 1], [1, 1/2], [2, 0], [1/2, 1/2]}

 

[[0, 0], [2, 0], [1, 1]]

 

Error, invalid input: simplex:-convexhull expects its 2nd argument, opts, to be of type identical(output) = {list({identical(area, hull, plot)}), identical(area, hull, plot)}, but received output = geometry:-area

 



To avoid this conflict between 'output'='area' and geometry:-area I did this
 

restart

geometry:-triangle(T, [point(A,0,0), point(B,2,0), point(C,1,3)]):

triangle: 0 < -point(A 0 0)+point(B 2 0)+point(C 1 3)

Error, (in geometry:-triangle) not enough information: the triangle is not defined

 

L := { [0,0], [1/2,1/2], [1,1], [2,0], [1,0], [1,1/2] };
simplex:-convexhull(L);
simplex:-convexhull(L, 'output'='area');

{[0, 0], [1, 0], [1, 1], [1, 1/2], [2, 0], [1/2, 1/2]}

 

[[0, 0], [2, 0], [1, 1]]

 

1

(2)

 


 

Download geometry_vs_simplex.mw

Please Wait...