How to get the "middle" vector of a face corner in geo nodes?

How do I get these vectors, the ones that split the face corner in two:

I tried doing it by getting the vector from the position of the corner to the position of the face, but those would point to the middle of the face and it broke down when the face was really long. And they weren’t really splitting the corner into two perfectly equal parts anyway.

Not sure if it’s the best approach but anyway …


EDIT :
Just realised you want to split the corner in equal parts, here it’s just averaging the direction of each edges and by giving a second look I’m not even sure it works :smiley:

A bit better but not there yet :

This should do it:

Snap… @moshus

Yeah, you have to correct for the direction of the edge as it can point toward or away from a corner.

The 4th solution :smiley:

You should be able to use a mix vector instead of adding and normalizing ?

The mix vector will output correct vector, but it won’t be length of 1 (normalized)

Ah right, it doesn’t rotate the vector, it just lerps it, so it’s going to be unnormalized. Makes sense !

Wow, so many solutions! :smiley: They all work, except in an edge case when the face is completely mangled and has a corner pointing inward. Doesn’t bother me, if you have geometry like that, you have bigger problems.

By the way, I found out that this vector is called a bisector. Look at me, learning basic geometry knowledge :sunglasses:

I have a method for detecting reflex angles…

Expanding on @higgsas’ method, chirality (or winding order of faces) is preserved with the Offset Corner in Face node so a cross of the 2 edge vectors will be in the opposite direction with the face normal if the angle is a reflex angle (i.e. the dot product will be negative).


You can use that fact to make reflex bisects point in the opposite direction by multiplying by -1.

@zerskilz - “chirality” … thanks for a new word of the day.

I always thought of it as “stereoisomerism”. (Just kidding!)

I’m pretty sure I didn’t use that word correctly… It may only apply to chemistry but for some reason I have associated it with “handedness” (incorrectly I think now). Maybe forget it and just use “winding order” instead :wink: