Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [barycentric-coordinates]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
0 answers

Rebasing barycentric coordinates to an adjacent triangle

Say that in a 2D space I have the barycentric coordinates B=(Bx, By, Bz) of point P relative to triangle T. I now need to calculate the barycentric coordinates B' of P relative to triangle T', where T ...
Gabriele Giuseppini's user avatar
0 votes
1 answer

Barycentric coordinates outputting coordinate outside of triangle

So I am trying to draw and fill a triangle on the screen using the barycentric method, but my barycentric implementation seems to be outputting outside triangle coordinates, why? ...
is code's user avatar
  • 11
0 votes
1 answer

Can you help me resolve a bug in mesh collision code?

I have entities which walk along a 3D mesh. I move the units along their x,z axis, and every frame I update their y-position according to the quad or triangle they are standing on, using Barycentric ...
Tree3708's user avatar
-1 votes
1 answer

Opengl in 500 lines barycentric calculation question I cannot figure out how we go from uAB-vector + vAC-vector + PA-vector = 0 to the linear system with ...
Bluebomber357's user avatar
1 vote
1 answer

Opengl in 500 lines point in triangle question I am on lesson 2 of the "Opengl in 500 lines" tutorial. I ...
Bluebomber357's user avatar
2 votes
2 answers

Finding the position of a point inside a triangle, based on the position of a point in another triangle (barycentric coordinates in Godot)

I'm trying to translate a UV coordinate into a world coordinate. (this is not in a shader, it's in GDScript in Godot, to bake out a texture based on some raycasts). So I find out which triangle in the ...
Kasper Arnklit Frandsen's user avatar
1 vote
1 answer

Why does my triangle rasterization miss some pixels along one edge?

I am having an issue rasterizing a triangle. The goal is to calculate barycentric coordinates and make the triangle based off those coordinates. I am having an issue with having weird jaggy missing ...
Joe's user avatar
  • 31
1 vote
1 answer

Clamp point to triangle for sphere collision

I'm having some issues clamping a 3d to barycentric triangle. I've searched for some time now and keep seeing the same results, that (u,v,w) should be clamped between 0 and 1. But when I clamp those ...
Josyah Dooley's user avatar
1 vote
0 answers

Explanation of the parameters in the line intersection code

I am trying to understand a C code that moves the mesh nodes for each time step and i am totally struck on the parameters t1 and t2 please help me sorting this out. So here is what the function gets (...
fascinatedbyCFD's user avatar
0 votes
0 answers

Ray-Triangle Intersection Detection using Barycentric Coordinates

I am attempting to convert the algorithm from to java code, but my solution does not function correctly. The only intentional change I made was for ...
Kent's user avatar
  • 101
3 votes
1 answer

Finding Pixels within UV Coordinates

I am building lightmaps for 3D models. My lightmap algorithm needs to determine which pixels( lumels ) within the lightmap texture fall within the boundary of a mesh face( triangle )...this process ...
P. Avery's user avatar
  • 575
4 votes
3 answers

Convert point to its barymetric coordinates

I'm making a 2.5D game engine (in JavaScript) and I'm trying to get it to detect whether a block is under the cursor. This would be a simple task were it restricted to single-level isometric ...
quinnirill's user avatar
2 votes
2 answers

Easy way to project point onto triangle (or plane)

I have a mesh of triangles (navigation mesh), and a point in 3d space. This point should be "over" one of the triangles all the times. I'm trying to determine which triangle is the one the point is "...
uorbe001's user avatar
70 votes
8 answers

What's the most efficient way to find barycentric coordinates?

In my profiler, finding barycentric coordinates is apparently somewhat of a bottleneck. I am looking to make it more efficient. It follows the method in shirley, where you compute the area of the ...
bobobobo's user avatar
  • 17.1k