0
$\begingroup$

I have vectors in matrix form. By using Mathematica, I want to draw it as convex cone and intersect. Let me explain, my intent is to create a new cone which is created by intersection of a null spaced matrix form vectors and same sized identity matrix. Formal definition of convex cone is,

A set $X$ is a called a "convex cone" if for any $x,y\in X$ and any scalars $a\geq0$ and $b\geq0$, $ax+by\in X$.

For example, I have the vectors given $$ \begin{bmatrix} 0 & 1 & 1 \\ 1 & 0 &1 \\ 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & -1 \\ 0 & 0& 1\\ 0 & -1& 0\\ 0 & -1& 1\\ -1 & 0& 0\\ -1 & 0& 1 \end{bmatrix} $$ and its null space is

1   0   0   0   0   0   0   -2  2   1   
0   1   0   0   0   0   0   -1  1   1   
0   0   1   0   0   0   0   -1  2   0   
0   0   0   1   0   0   0   0   1   0   
0   0   0   0   1   0   0   -1  1   0   
0   0   0   0   0   1   0   1   -1  -1  
0   0   0   0   0   0   1   1   -1  0   

and an same sized $10\times 10$ identity matrix that

Identity Matrix 10 x 10
1 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0
0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 1

In a different program language (object oriented), I create two different cones by using the both matrices. One of the null-spaced, the other is identity matrix as I show. Then to intersect them, I gather both equations and inequalities of the aforementioned two matrices. By using the gathered (combined) equations and inequalities, I create a new resulting (intersected) cone. To be sure that I get right result, I obtain the equations and inequalities of the resulting (intersected) cone. Frankly, I'm user and fan of wolframalpha. When I stuck on a point, I generally apply for that. So to check my program's result, I need mathematica's output. It's not homework, however, related to my thesis. If I can show the mathematica's result as well on my presentation, it will be really helpful for me, if possible, with shape-drawn. My program's example output,

Inequalities of Intersected resulting Cone
(-2, -1, -1, 0, -1, 1, 1, 0, 0, 0),   x + 0 >= 0
(0, 0, 0, 0, 0, 1, 0, 0, 0, 0),     x + 0 >= 0
(0, 0, 0, 0, 1, 0, 0, 0, 0, 0),     x + 0 >= 0
(0, 0, 0, 1, 0, 0, 0, 0, 0, 0),     x + 0 >= 0
(0, 0, 1, 0, 0, 0, 0, 0, 0, 0),     x + 0 >= 0
(0, 1, 0, 0, 0, 0, 0, 0, 0, 0),     x + 0 >= 0
(1, 0, 0, 0, 0, 0, 0, 0, 0, 0),     x + 0 >= 0
(1, 1, 0, 0, 0, -1, 0, 0, 0, 0),    x + 0 >= 0
(2, 1, 2, 1, 1, -1, -1, 0, 0, 0),   x + 0 >= 0

Equations of Intersected resulting Cone
(0, 0, -1, -1, 0, 0, 0, 1, 1, 0),   x + 0 == 0
(-1, -1, 0, 0, 0, 1, 0, 0, 0, 1),   x + 0 == 0
(1, 0, 1, 0, 1, 0, -1, 1, 0, 1),    x + 0 == 0

By the way, If you are cognizant of SAGE, I also make use of its documentation. What's cone?

$\endgroup$
  • $\begingroup$ Is the question about how to draw a convex cone in 3D from n 3D vectors? $\endgroup$ – Vasily Mitch Dec 3 '17 at 19:08
  • $\begingroup$ My program's input is supported by n dimension but for this example yes 3d. @VasilyMitch $\endgroup$ – concurrencyboy Dec 3 '17 at 19:09
  • $\begingroup$ Did you try anything in Mathematica? Please at least format your data so we can copy and paste into Mathematica. $\endgroup$ – halmir Dec 4 '17 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.