简体   繁体   中英

Calculate points on surface of 3d model

I have a 3d model (from Blender) with vertices, vertices normals (normalized) and faces (triangles). I need to calculate additional vertices and their normals. Other words, I need algorithm to calculate center vertex for triangle from three vertices and three vertices normals.

For example, in picture we have A, B, C vertices. How to calculate D vertex and it's normal?

Or, even better, point E (center of one of the sides).

在此处输入图片说明

Could anybody help me?

If you want point D lie exactly on plane based on ABC then I suggest you to use barycentric coordinates . Point D is intersection of medians and it is (1/3, 1/3, 1/3) in barycentric coordinates, or D = 1/3A + 1/3B + 1/3C, E would be (0,1/2,1/2). The normal ND should be calculated in the same way as D, ND = 1/3NA + 1/3NB + 1/3NC.

You didn't state the reason why do you need to calculate D and E. I suppose you want to get more triangles in the mesh, thus better level of detail. In this case PN-triangles should be used

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM