Skip to main content
gamedev.net
🔒 Locked

Barycentric Coordinates

Started by lucky6969b 3 replies 900+ views
Original Post
lucky6969b
lucky6969b
Hi fellas, I'd like to manipulate/sometimes add and remove vertices/edges/faces from a mesh. Is the barycentric coordinate the way to go? Or I can have some alternatives? Thanks Jack
Mike nl
Mike nl
From your extremely undescriptive description I'm inclined to say no, but it really depends exactly what you want to do. How do you want to manipulate them? How do you determine what you want to delete?

Need more info.
Million-to-one chances occur nine times out of ten!
lucky6969b
lucky6969b
Quote:
Original post by Mike nl
From your extremely undescriptive description I'm inclined to say no, but it really depends exactly what you want to do. How do you want to manipulate them? How do you determine what you want to delete?

Need more info.


I am basically working on a NavMesh Auto-generator. For this to work,
I need to sometimes add some vertices between edges so the agent has somewhere to stand. I start off with subdividing a Navmesh when it intersects with a geometry. Next I need to merge them back so that it is efficient enough and suitable for pathfinding....
Thanks
Jack
LorenzoGatti
LorenzoGatti
Barycentric coordinates are useful to treat the interior of any triangle in the same way regardless of position and size: the main application I've seen them used for is defining and evaluating basis functions for interpolation, finite element methods, etc.

It seems the only thing you are doing with the interior of your triangles is selecting appropriate places to split them: you don't need explicit barycentric coordinates for points, only interpolation of world coordinates of vertices to get other points.
For example, you can split triangle ABC into four congruent pieces with edge midpoints (A+B)/2,(B+C)/2,(C+A)/2; into three triangles with barycenter (A+B+C)/3; into a fan of N equal area triangles with n-1 points equally spaced along an edge (kA+(n-k)B)/N, 1<=k<=n-1.
Omae Wa Mou Shindeiru
lucky6969b
lucky6969b
Quote:
Original post by LorenzoGatti
Barycentric coordinates are useful to treat the interior of any triangle in the same way regardless of position and size: the main application I've seen them used for is defining and evaluating basis functions for interpolation, finite element methods, etc.

It seems the only thing you are doing with the interior of your triangles is selecting appropriate places to split them: you don't need explicit barycentric coordinates for points, only interpolation of world coordinates of vertices to get other points.
For example, you can split triangle ABC into four congruent pieces with edge midpoints (A+B)/2,(B+C)/2,(C+A)/2; into three triangles with barycenter (A+B+C)/3; into a fan of N equal area triangles with n-1 points equally spaced along an edge (kA+(n-k)B)/N, 1<=k<=n-1.


Hi,
Are there anywhere I can get some illustrations on how to go about doing triangle splitting from the web?
BTW, do you know how to do intersection cut when the navmesh intersects with a geometry? I am using MAXSDK, I guess any DirectX API will do as well... but I don't know how to do it.. could you please help me out with this too?
Thanks
Jack

[Edited by - lucky6969b on August 27, 2008 3:58:47 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.