decorqert.blogg.se

Tessellation rotation example
Tessellation rotation example








tessellation rotation example

From that, you can easily calculate the center of the pentagon (I can supply formulas if you wish). You need to know two adjacent vertices of a pentagon. I suggest you do that in place, rather than at the origin. One approach would be to draw a mesh for 1/5 of one of the pentagons.

tessellation rotation example

I don't know anything about the library you're using, but maybe I can help with the geometry. I think this would be less performant than positioning the. The problem is, I have no idea how I can calculate what this value should be.Ĭan anyone help or point me to some resources? Alternatively, I could use the fact that I know the coordinate of every vertex in the shape to fill in these pentagons by drawing triangles using LibGDX's ModelBuilder. I know that I can fix this rotation using (Vector3.Y, *value*) based on some value for each pentagon. Forgetting about the scaling for now, you can see that the pentagon is rotated improperly.

#Tessellation rotation example code

I start by creating the 12 meshes at the origin (the center of this shape) and then using the following code to rotate and move them into position. What I have is this shape (mostly hexagons with 12 pentagons): Īnd I want to place 12 pentagon meshes into their 12 spots. I've got a tricky question today which involves a lot of vectors.










Tessellation rotation example