Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Determining concave bends of a face in a 3D polygon

 
Post new topic   Reply to topic Printable version
 View previous topic  DSB to go offline Post :: Post Creating scripts to update mozilla+acr...  View next topic  
Author Message
L.C.
Server Help Squatter


Age:33
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Thu Jun 17, 2010 9:14 pm   Post maybe stupid    Post subject: Determining concave bends of a face in a 3D polygon Reply to topic Reply with quote

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)?
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Thu Jun 17, 2010 11:31 pm   Post maybe stupid    Post subject: Reply to topic Reply with quote

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...

?
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Blocks
Novice


Joined: Jul 13 2006
Posts: 95
Location: California
Offline

PostPosted: Fri Jun 18, 2010 12:20 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
L.C.
Server Help Squatter


Age:33
Gender:Gender:Male
Joined: Jan 03 2003
Posts: 574
Location: Missouri, US
Offline

PostPosted: Fri Jun 18, 2010 1:03 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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).
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Dr Brain
Flip-flopping like a wind surfer


Age:38
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Fri Jun 18, 2010 7:47 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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).
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Jun 18, 2010 10:32 am   Post maybe stupid    Post subject: Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Trash Talk All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 653 page(s) served in previous 5 minutes.

phpBB Created this page in 0.609261 seconds : 31 queries executed (74.6%): GZIP compression disabled