# Criss Cross triangulation

**URL:** https://community.freefem.org/t/criss-cross-triangulation/3254
**Category:** General Discussion
**Created:** [May 18, 2024, 2:51pm UTC](https://community.freefem.org/t/criss-cross-triangulation/3254 "2024-05-18T14:51:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![GGian](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GGian](https://community.freefem.org/u/GGian)
#### Post date: [May 18, 2024, 2:51pm UTC](https://community.freefem.org/t/criss-cross-triangulation/3254/1 "2024-05-18T14:51:45Z")

</div>

Hello,  
I would like to do some calculations on the unit square using criss-cross meshes.  
Is there a simple way to create such a mesh on a unit square?

Thanks!

---

<div class="post-metadata">

### Author: ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)
#### Post date: [May 18, 2024, 7:08pm UTC](https://community.freefem.org/t/criss-cross-triangulation/3254/2 "2024-05-18T19:08:12Z")

</div>

Do you mean a mesh like this?  
 ![crisscross](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/e/ee6e500d60c1e9d32fa5be19c2d93428829e43ff.jpeg)

---

<div class="post-metadata">

### Author: ![GGian](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GGian](https://community.freefem.org/u/GGian)
#### Post date: [May 19, 2024, 7:41am UTC](https://community.freefem.org/t/criss-cross-triangulation/3254/3 "2024-05-19T07:41:35Z")

</div>

It should be quite similar, but I think it isn’t the one you plotted. The procedure that I want to use can be described as follows:  
partition the domain into triangles by first subdividing it into squares with sides of length 2h (here h is 2^(-k), k integer).  
Then dividing each of these squares firstly into four squares with sides of length h and then into eight  
triangles by dividing the large square by its diagonals.

---

<div class="post-metadata">

### Author: ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)
#### Post date: [May 19, 2024, 12:53pm UTC](https://community.freefem.org/t/criss-cross-triangulation/3254/4 "2024-05-19T12:53:02Z")

</div>

Is this what you’re looking for:

> [@Crossed mesh on a square](https://community.freefem.org/t/crossed-mesh-on-a-square/2897):
>
> Hello. I would like to do some calculations on the unit square using crossed meshes. Is there a simple way to create a crossed mesh on a unit square? I would also like to globally refine a mesh such that the old mesh to be a subset of the new mesh. Is that possible to create a uniform crossed mesh by giving the maximum edge of a triangle? I would be grateful for any help!

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [May 20, 2024, 8:55am UTC](https://community.freefem.org/t/criss-cross-triangulation/3254/5 "2024-05-20T08:55:12Z")

</div>

in freefem just do:

```auto
mesh Th = square(n, m, [x0+(x1-x0)*x, y0+(y1-y0)*y], flags=1);// 

```

build a will produce a _Union Jack flag_ type of mesh or criss-cross meshes.
