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
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 ...
Gabriele Giuseppini's user avatar
0 votes
1 answer
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? ...
is code's user avatar
  • 11
0 votes
1 answer
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 ...
Tree3708's user avatar
-1 votes
1 answer
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 ...
Bluebomber357's user avatar
1 vote
1 answer
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 ...
Bluebomber357's user avatar
2 votes
2 answers
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 ...
Kasper Arnklit Frandsen's user avatar
1 vote
1 answer
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 ...
Joe's user avatar
  • 31
1 vote
1 answer
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 ...
Josyah Dooley's user avatar
1 vote
0 answers
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 (...
fascinatedbyCFD's user avatar
0 votes
0 answers
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 ...
Kent's user avatar
  • 101
3 votes
1 answer
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 ...
P. Avery's user avatar
  • 575
4 votes
3 answers
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 ...
quinnirill's user avatar
2 votes
2 answers
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 "...
uorbe001's user avatar
70 votes
8 answers
112k views

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