Server Help

Trash Talk - Determining concave bends of a face in a 3D polygon

L.C. - Thu Jun 17, 2010 9:14 pm
Post subject: Determining concave bends of a face in a 3D polygon
Here are the coordinates for the four vertexes of this single-sided face (or you can think of it as a finite plane):

(0, 0, 0)
(9, 12, 0)
(1, -2, 16)
(12, 12, 20)

If you wanted to split this into two triangles, you would create a line between either of these two pairs:

(1, -2, 16) and (9, 12, 0)
(0, 0, 0) and (12, 12, 20)

So how do I determine if this four-cornered 3D finite plane has a concave or convex bend along the two possible edges that could be created from the above pairs (only one or the other -- not both -- could be used)?
Samapico - Thu Jun 17, 2010 11:31 pm
Post subject:
Not sure to understand that...
If you defined your face with 4 coordinates, it's flat... and if you split it in 2 triangles, they'll both be on the same plane...

?
Blocks - Fri Jun 18, 2010 12:20 am
Post subject:
Samapico wrote:
Not sure to understand that...
If you defined your face with 4 coordinates, it's flat... and if you split it in 2 triangles, they'll both be on the same plane...

?

If you defined YOUR face with 4 coordinates, it'd still be ugly. OH SNAP. o/

No really though, your question is ill-posed. A plane can be defined by three points, you give four. It's possible they all still lie on the same plane, but the way the rest of your question goes, it would seem that they are not.

The answer is found using the calculus.
L.C. - Fri Jun 18, 2010 1:03 am
Post subject:
Quote:
No really though, your question is ill-posed. A plane can be defined by three points, you give four. It's possible they all still lie on the same plane, but the way the rest of your question goes, it would seem that they are not.
Yes -- I am wanting to know if the four points lie on the same plane. It could be, by the naked eye, that you cannot see whether or not it is bending.

In Half-Life, you cannot have a concave bending of a face formed with 4+ vertexes. (With 3 points total, you can't have either.) If you were to make a face with a vertex at a point where you bend the face, you would have to split the face across where it bends so that the face is still valid (game engine will not accept the polygon otherwise).


^^ Pink face is the plane we're talking about

If you placed that plane flat on a table and lifted up any of the vertexes (one of them), you would be bending the face. Depending which vertex you would lift, that would also determine which pair of vertexes you would have to split the plane across (into 2 faces from that single face).
Dr Brain - Fri Jun 18, 2010 7:47 am
Post subject:
Concave is convex from the other side of the face, so you're going to have to be more explicit in your requirements.

You'll need a way to generate the normal vectors for the face. That comes about by specifying a point on the inside of the object, or by specifying the order of the vertices relative to the outside (clockwise or counterclockwise).
Samapico - Fri Jun 18, 2010 10:32 am
Post subject:
Oh right, I thought something was weird with 4 points too, but I couldn't see it for some reason...

And yeah, my next question would have went the same way as Brain: it depends from which side you're looking at it... Once you define a normal for both of your planes (a simple cross-product if your vertex are always in the same order, i.e. v1-v2 cross v2-v3 always gives you the normal, or the other way around)
And by v1-v2-v3 I'm speaking of the 3 vertex you choose to form a triangle.
Once you have 2 normals, it should be easy to figure out if the bend is convex or concave. If both normal vectors are pointing in each other's direction, it's concave, otherwise it's convex.

Something like that
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group