# Move polygon vertices along average vector of the two closest segments

Hello,
I am sorry for a really stupid question, but I’m struggling to get an “offset” curve like in the picture. I would like to make a variable offset along average vector of the two closest segments of the point, can anyone please help me to get the vector?

Hey
You can use this definition.
Variable offset.gh (6.9 KB)

what I was thinking about how to create this, was not to have a centre point (there are problems if the polygon is too complicated)

So my goal was to find a vector as an average vector from the segments so it shouldn’t make troubles

What I´m struggling with is to get the final vectors beeing pointed out of the shape no mater which direction are the former vectors

Don’t you know how to do this?
Thanks

Could something like this work?

Variable offset 2.gh (11.0 KB)

1 Like

Thank you so much!

A simple way to get the sign for the average vectors that will always point out is to use the sign of the cross product Z component:
bisector.gh (12.0 KB)

3 Likes