Sign in to follow this  

Split Vertex, calculating the new Normal vector

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have some code that splits a vertex on a plane and creates a new point where the vertex intersects the plane. So I have start and end verticies which lie on either side of the plane. What I need to know is to calculate the normal for the new vector, assuming that the start and end verticies have different normals. Thanks, Chris

Share this post


Link to post
Share on other sites
I've thought of something like this:

Vector3 normal = ((start.Normal*proportion) + ((1-proportion) * end.Normal));

where proportion is:
float proportion = Vector3.Length(start.Position - middle) / Vector3.Length(start.Position - end.Position);

and middle is the point of interseciton with the plane.

But I'm not convinced this works :/

Edit: it doesn't work

[Edited by - cpcollis on August 25, 2004 7:16:35 PM]

Share this post


Link to post
Share on other sites
Solution:

normal.X = start.Normal.X + (end.Normal.X - start.Normal.X) * proportion;
normal.Y = start.Normal.Y + (end.Normal.Y - start.Normal.Y) * proportion;
normal.Z = start.Normal.Z + (end.Normal.Z - start.Normal.Z) * proportion;

Edit: lol, or this:

Vector3 normal = start.Normal + (end.Normal - start.Normal) * proportion;

Share this post


Link to post
Share on other sites

This topic is 4859 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this