ive been asking around a bit for this one question for a while (not here), so hopefully this is my last one, im getting close to an answer.how do i find the "region" of a triangle? as in, what formula can i use to accurately locate all space imbetween all 3 points simultaneously?while the "area" loosely describes its total volume in a singular number, what im looking for is something more like a range that shows you every possible point within the triangle.this formula must also work for every possible triangle-angle, assume the triangle im trying to find the range of is super irregular and arbitrary, so a simple right triangle answer wont cut it either (though i imagine working with right triangles will help me reach my answer)im looking to seep in as much information i can because i do wanna get a taste of each "kind" of solution to pick the one that i personally like the bestpost in picrel is the best answer i've gotten, and i'd like to know if anyone knows more precisely what theyre talking about since i didnt completely understand what they were talking about at around the purple area,help on the formula IM trying to make would be appreciated too
{αA+βB+γC∣α,β,γ≥0,α+β+γ=1}
>>16805537i understand math fundamentally but i dont understand the specific semantics used for precise formulas, like, i dont understand what these variables are used for or what they represent, the fact im asking how to even do it to begin with should show that, like, if you said "y=B/A" alone i wouldnt understand unless you specified "b=y1-y2 and a=x1-x2"
>>16805974>i understand math fundamentallyeverything you wrote after this sentence proves the exact contrary
>>16805535What you're calling region can only be defined relative to the origin of some planar axes. Region vs. area just depends on what you label your vertices relative to (0,0). Not sure what else you're trying to get at?
>>16805994im trying to define the entire area (not literal) that a triangle engulfs.>while the "area" loosely describes its total volume in a singular number, what im looking for is something more like a range that shows you every possible point within the triangle.i.e. a point could run that formula to see if it is inside the triangle or not.>>16805991why grovel about what i dont know when i could try to learn instead?>>16805535i misinterpreted "what side of the line contains the third vertex" as "which node of the line is point c tethered to", when it actually means "which side of the line is it's back" to create an infinitely extending plane
>>16806010It's literally just the over under on three lines, each defined by two points and the slope connecting them, relative to some arbitrary origin (0,0).
>>16805535suppose that the vertices of the triangle are at v0 = (x0, y0, z0), v1 = (x1, y1, z1), and v2 = (x2, y2, z2)the area is A = ||(v1 - v0) x (v2 - v0)|| / 2, where x is cross product and ||.|| is normif you are working in 2d, then just assume that z0 = z1 = z2 = 0pic related shows the geometry. the area of shaded (light green and dark green) region is equal to the norm of the cross product, so you divide the result by two to get the area of the triangle (light green)this can also be phrased in terms of a determinantin fact, you can work out the winding of the triangle (whether the points appear CW or CCW) using similar techniques. in computer graphics, people use such a test to determine whether a triangle is considered facing the screen or away (in the latter case, many times you can cull the triangle)
>>16805974look up barycentric coordinates
>>16806074i mean it SOUNDS nice and with every image i see it seems pretty coherent but every single resource i try to get into it with just overloads me with so much unrelated information, and because of all the junk data its extra easy to miss something actually important, and im not too happy about, like, scouring an hour long read for the SINGULAR FORMULA im looking for. if theres any specific resource you have in mind please let me know>>16806071>the area is A = ||(v1 - v0) x (v2 - v0)|| / 2, where x is cross product and ||.|| is norm>the area
>>16806443Nigger: you can literally tell if (8,5) is over or under the line connecting (2,1) and (5,3) by calculating the slope of that line. Just do this same thing for each line of your triangle and exclude the points that don't conform.
>>16806451i know how to calculate the slope of the line i just dont know how to use it. like, yeah, x=(y*1.5)+5, what now, how do i define a space that is on either side of that line
>>16806463By plugging in x and y and observing if the left hand side is greater than, less than, or equal to the right hand side.
>>16806466>_>that, only calculates a straight vertical line. what about an ANGLED line (im gonna look that up too since it probably has much better results than something more specific like the inside of a triangle)
>>16806469Try putting some (x,y) into x=(y*1.5)+5. You'll quickly disprove your own caveat.
>>16806470dude what do you mean "putting some (x,y) into" it, the formula isnt just gonna do itself. x,y are coordinates, two seperate numbers, how are they even gonna be "put" in, addition? multiplication? (obviously neither of these it would be something more complicated)
>>16806443>all the junk datais what you need to understand, stupid assholethe intuition behind barycentric coordinates is that they describe a weighted average of the vertices
>>16806474That's how variables work. You have a point (x,y) = e.g. (226,44) and you plug it into x=(y*1.5)+5 to see how 226 compares to (44*1.5)+5
>>16805535https://math.stackexchange.com/questions/51326/determining-if-an-arbitrary-point-lies-inside-a-triangle-defined-by-three-pointsLearn to use the internet
>>16806496>is what you need to understand, stupid assholeif im just given the formula with the bare minimum needed to understand it then i'd already know what all the junk data is (and thats how it has been every time i learned something on my own or somebody else showing me something). i dont need to know {the great grand dad {of the philosopher who coined the formula}'s left testicle's maximum sperm volume} to understand that a-b= the distance b needs to travel to reach a. cant blame me for having priorities, especially as someone who likes to homebrew my own formulas and hates following strict tutorials that ultimately only teach you to regurgitate information.thats why im even asking for help here, talking to another person is a lot more helpful since theyre a lot better at addressing specific concerns you have, if i wanted to watch a half hour long video that suddenly drops the important information in an arbitrary spot and then never elaborates on it then i wouldve done that already.
>>16806503you assume that you can judge what is important and what isn't about other people's ideas without any understanding of said ideasi'm not going to waste my time relaying how to formulate general barycentric coordinates to you, even when i have a fully typed up derivation on handlater
>>16806498now *thats* a good response. not sure how to get it to align but i can probably figure that out on my own. sincerest thanks!>>16806514why are you being such a moralfag?? im not talking down to other learning methods im just saying they dont work for me, and im finding workarounds to getting what i actually want. im able to learn things in a brief period that most others spend several days studying for so i frankly dont see the problem
>>16806525
>>16805535regarding the purple highlighted text:If (y2 - y1)(x3 - x1) - (x2 - x1)(y3 - y1) > 0, you choose the inequality (y2 - y1)(x - x1) - (x2 - x1)(y - y1) >= 0.If (y2 - y1)(x3 - x1) - (x2 - x1)(y3 - y1) < 0, you choose the inequality (y2 - y1)(x - x1) - (x2 - x1)(y - y1) <= 0.If (y2 - y1)(x3 - x1) - (x2 - x1)(y3 - y1) = 0, then you don't have a triangle, because either point C is on line AB or points A and B are the same point.