Split Vertex, calculating the new Normal vector

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

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

1. 1
2. 2
Rutin
21
3. 3
A4L
15
4. 4
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 44
• Forum Statistics

• Total Topics
633742
• Total Posts
3013639
×