# Questions tagged [barycentric-coordinates]

The tag has no usage guidance.

14 questions
Filter by
Sorted by
Tagged with
43 views

### 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 ...
414 views

### 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? ...
• 11
44 views

### 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 ...
• 31
276 views

### Opengl in 500 lines barycentric calculation question

https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling I cannot figure out how we go from uAB-vector + vAC-vector + PA-vector = 0 to the linear system with ...
1 vote
108 views

### Opengl in 500 lines point in triangle question

https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-back-face-culling I am on lesson 2 of the "Opengl in 500 lines" tutorial. I ...
938 views

### 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 ...
1 vote
743 views

### 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 ...
• 31
1 vote
452 views

### 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 ...
1 vote
73 views

### 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 (...
846 views

### Ray-Triangle Intersection Detection using Barycentric Coordinates

I am attempting to convert the algorithm from http://www.cbloom.com/3d/techdocs/fast_ray_tri.txt to java code, but my solution does not function correctly. The only intentional change I made was for ...
• 101
2k views

### 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 ...
• 575
1k views

### 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 ...
• 153
7k views

### 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 "...
• 23