How to Insure a Rectangle Lies Inside a Polyhedron?

  • Thread starter EngWiPy
  • Start date
  • Tags
    Rectangle
In summary, when trying to determine if a rectangular solid is inside a convex polygon, just test whether its corners are.
  • #36
Stephen Tashi said:
It's time for me to ride the exercise machine for half an hour. I'll be back later. I think the definition of polytopes must be done by intersecting half spaces , not merely half planes. The we can say something about an edge being the part of a line of intersection between two hyperplanes that is also on the boundary of the volume formed by all the intersecting half spaces.

have a nice time.
 
Physics news on Phys.org
  • #37
S_David said:
(I do not understand the underlined part).
It means that if you pass a plane through the face of a convex polygon then either all the polygon is on one side of the plane or all of the polygon is on the other side of the plane. You don't have part on one side and part on the other.

I think, we can say that each hyperplane is cut by two other hyperplanes to form a polytope. This process makes a polytope intersected polygons, and a polygon is bounded, and its edges are line segments. Am I right on this?
[/QUOTE]

I don't think that is precise enough for a mathematical definition, but you might have the correct intuitive idea. It isn't clear whether your phrase "two other hyperplanes" means "exactly two" or "at least two". Look at the plane that contains one face of a rectangular solid. It is intersected by 4 other planes that bound the figure.

If you want to get the verbal definition of polygon/polytope correct, we both are going to have to consult some references!
 
  • #38
Let us skip this discussion for a moment, because this requires us to go back to some definitions and references, and let us focus more on the core problem.

This says to form a vertix, you look in each coordinate and you either make it the corresponding coordinate in the "lower" vertex of the rectangle or you make it equal the correspoinding coordinate of the "upper" vertex.

All possible combinations of choices give all possible vertices.

What do you mean by this?
 
  • #39
What do you mean by this?

Think of the 0's and 1's in the example as representing a decision.
1 = go to the coordinate of the upper vertex U,
0 = stay at the corner of the lower vertex L.

L = (1,2) , U = (5,7) , U-L = (4,5)

All possible ordered pairs of 0's and 1's represent all possible decisions about the vertices.

(0,0) -> vertex (1,2) = (1+ (0)4, 2 + (0)5)
(1.1)-> vertex (1,7) = (1 +(0)4, 2 + (1)5)
(1, 0)-> vertex (5,2) = (1 + (1)4, 2 + (0)5)
(1,1)-> vetex (5,7) = (1 + (1)4, 2 + (1) 5)
 
  • #40
Stephen Tashi said:
Think of the 0's and 1's in the example as representing a decision.
1 = go to the coordinate of the upper vertex U,
0 = stay at the corner of the lower vertex L.

L = (1,2) , U = (5,7) , U-L = (4,5)

All possible ordered pairs of 0's and 1's represent all possible decisions about the vertices.

(0,0) -> vertex (1,2) = (1+ (0)4, 2 + (0)5)
(1.1)-> vertex (1,7) = (1 +(0)4, 2 + (1)5)
(1, 0)-> vertex (5,2) = (1 + (1)4, 2 + (0)5)
(1,1)-> vetex (5,7) = (1 + (1)4, 2 + (1) 5)

I just arrange this formulating to this example as following:

[tex]v_i=(v_{i1},v_{i2})=(1+\delta_{i1}(4),2+\delta_{i2}(5))[/tex]

And as you said, all combinations of [tex](\delta_{i1},\delta_{i2})[/tex] give all possible vertices of the rectangle in 2D with upper vector U and lower vector L. Again, I agree on this formulating. The question now: why did you did that systemic formulation of the vertices? How this can help us understanding the problem?
 
  • #41
I'm thinking about making an equation that looks like Prof. Boyd's method. That was my motivation for enumerating the vertices with the deltas.Let [itex] a [/itex] represent one row of the constraint matrix [itex] \mathbf{A} [/itex]. Pretend we're in 2 dimensions, so [itex] a = (a_1,a_2) [/itex]

The row defines the left hand side of a constraint , which is:

[tex] a_1 x_1 + a_2 x_2 \leq b [/tex] where [itex] b [/itex] is a scalar.

The crucial values for [itex] (x_1,x_2) [/itex] are the vertices of the rectangle. If one vertex fails to satisfy the constraint, the rectangle isn't a solution.

Let the lower vertex of the rectangle be [itex] l = (l_1,l_2) [/itex] and the upper vertex be [itex] u = (u_1, u_2) [/itex].

To represent testing all vertices in the constraint, we can write

[tex] a_1 (l_1 + \delta_1(u_1 - l_1) + a_2(l_2 + \delta_2(u_2 - l_2) \leq b [/tex]

Where [itex] \delta_1 [/itex] and [itex] \delta_2 [/itex] range over all possible combinations of 0's and 1's.

Applying some algebra to the above:

[tex] a_1 \delta_1 u_1 - a_1(\delta_1 - 1) l_1 + a_2 \delta_2 - a_2( \delta_2 - 1) l_2 < b [/tex]

[tex] = a_1 \delta_1 u_1 + a_2 (\delta_2) - ( a_1 (\delta_1-1)l_1 + a_2(\delta_2 - 1) l_2) < b [/tex]

This has a strong resemblance to Prof Boyd's constraint, which would be:

[tex] a_1^+ u_1 + a_2^+ u_2 - (a_1^- l_1 + a_2^- l_2 )< b [/tex]

We have to convince ourselves that using Prof. Boyd's [itex] a^+ [/itex] and [itex] a^- [/tex] somehow picks out the values for the deltas that maximize the left hand side of the constraint.
 
  • #42
Ok, that is good. But what is the geometric interpretation for this? I mean, as prof. Boyd's said in the solution, a trivial way is to check that all vetrices of the rectangle lie within the polytope, where we have [tex]2^{n}[/tex] vertices, right? But, apparently, there is a much more efficient way.

Let me give example: Suppose we want to insure that all elements of a matrix is less that a constant, say c. Then it suffices to check that the min element of the matrix is less than c. I think, prof. Boyd's method resembles this thinking. I don't know, may be if the maximum difference of something and something less than b, then all vertices are less than b. However, I don't know what is this "something", and what is the geometric interpretation of it.
 
  • #43
I don't see a good geometric interpretation for Prof. Boyd's constraint. I think the way to see it is from algebra.

I shall fix a typo ( a missing [itex] u_2 [/itex] ) in my constraint and compare it

Constraint 1: [tex] a_1 \delta_1 u_1 + a_2 \delta_2 u_2 - ( a_1 (\delta_1-1)l_1 + a_2(\delta_2 - 1) l_2) < b [/tex]

with

Constraint 2: [tex] a_1^+ u_1 + a_2^+ u_2 - (a_1^- l_1 + a_2^- l_2 )< b [/tex]

If we were trying to make the left hand side of Constraint 1 as large as possible, which values for the deltas would we pick?

Relevant to [itex] \delta_1 [/itex] are the terms [itex] a_1 (\delta_1-1) u_1 [/itex] and [itex] a_1(\delta1 -1) l_1 [/itex].

We know [itex] l_1 < u_1 [/tex]

Suppose [itex] a_1 > 0 [/itex].

If we set [itex] \delta_1 = 1 [/itex] then the total contribution of the two terms is

[tex] a_1 u_1 [/tex]

If we set [itex] \delta = 0 [/itex] then the total contribution of the two terms is

[tex] - a_1( -1)l_1 = a_1 l_1 [/tex]

So the best choice is [itex] \delta_1 = 1 [/tex]

Notice how Prof. Boyd's use of the [itex] \mathbf{A^+} [/itex] and [itex] \mathbf{A^-} [/itex] matrices makes the same choice in this case.

In Constraint 2: [tex] a_1^+ u_1 + a_2^+ u_2 - (a_1^- l_1 + a_2^- l_2 )< b [/tex]

if [itex] a_1 > 0 [/itex] then [itex] a_1^+ = a_1 [/itex] and [itex] a_1^- = 0 [/itex]

So the total contribution of the terms involving [itex] a_1 [/itex] is the same as in Constraint 1.

I think we prove Prof. Boyd's constraint by looking at the various cases for the sign of the [itex] a_i [/itex]. We decide what the best value for [itex] \delta_i [/itex] is and we confirm that the [itex] a^+_i [/itex] and [itex] a^-_i [/itex] terms produce the contribution that matches our choice of [itex] \delta_i [/itex].
 
  • #44
That is awesome. I tried all combinations of [tex](\delta_1,\delta_2)[/tex] and all signs of [tex](a_1,a_2)[/tex] and compare them with prof. Boyd's notation, and it is just working perfectly.

I wonder how math can do all of this. It is amazing. I mean, I am an engineer, and you just have to set up the problem mathematically, and see if a system is working!

Thank you Stephen Tashi for your patience. I am really appreciate your help and you time.

Best regards
 
  • #45
You're welcome. I hope if you come across other problems that are this interesting that you will post them.
 
  • #46
Stephen Tashi said:
You're welcome. I hope if you come across other problems that are this interesting that you will post them.

Of course I will.
 

Similar threads

  • Differential Geometry
Replies
12
Views
3K
Replies
4
Views
1K
Replies
5
Views
1K
Replies
4
Views
1K
Replies
4
Views
108
Replies
3
Views
1K
  • Advanced Physics Homework Help
Replies
1
Views
902
  • Quantum Physics
Replies
6
Views
1K
Replies
27
Views
2K
Back
Top