Struggling to find good explanation on how to create a triangle from given points

I have been scripting for a while, not really tapped into CFrame advanced side THAT much yet. I have however read axisangle’s take on it, which was very informative. I figured I would be able to use this information to write a script that generates triangles but I am very baffled on what to do.

I have read a dozen articles about this, however I couldn’t find anything to explain the in-depth logic. I have found a few open-source codes to these scripts but since I don’t understand them, I can’t utilise them to their full extent.

If there’s any guide that could walk through the whole process of writing a triangle creator - that would be exactly what I am looking for.

Thanks <3 for at least reading this plebian’s cry for help. I have always gotten support so quickly and I really do appreciate it. Happy new years ^^

2 Likes

This article by @EgoMoose gives a fairly good explanation on how the math works.

It really helped me when I was looking into this.

EDIT

If what you’re looking for is generating triangles from a grid of vertexes, I can also help you with that, but I’m not sure if that’s what the OP is asking.

4 Likes

To create a triangle with given vertices you could look into Polygon Triangulation( if you haven’t already) , i am not sure what you are trying to achieve though

2 Likes

I was looking for was an explanation HOW to accomplish making something like that. I don’t want the product, I want to learn to make the product (… as they: give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime).

Though the source is helpful to affirm my (…knowledge) so thanks for the input anyway.

4 Likes

I’m not sure if you were replying to only @Jaycbee05 or both of us, but the article I provided does give an explanation of everything that is happening.

What part, specifically, are you trying to understand?


If you are still struggling with how everything works you might want to look into vector math:

I was replying to @Jaycbee05 (that is why it has that reply sign :stuck_out_tongue: )

Im still not entirely sure what you’re looking for? If you want polygon triangulation then just search for some algorithms from the wikipedia page.

1 Like

I want to understand polygon triangulation, and how it works and how I can implement it in roblox (by myself). I don’t want a finished set of code.

Usually explanations include finished sets of code Or at least pseudo code. I’d recommend you take the wikipedia article Jaycbee linked and google search explanations of those methods/algorithms.

3 Likes