# Problem with LineSystem

**URL:** <https://forum.babylonjs.com/t/problem-with-linesystem/13655>\
**Category:** Questions\
**Tags:** material\
**Created:** [August 25, 2020, 6:51am UTC](https://forum.babylonjs.com/t/problem-with-linesystem/13655 "2020-08-25T06:51:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arash\_Bagheri](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Arash\_Bagheri](https://forum.babylonjs.com/u/Arash_Bagheri)\
**Post date:** [August 25, 2020, 6:51am UTC](https://forum.babylonjs.com/t/problem-with-linesystem/13655/1 "2020-08-25T06:51:03Z")

</div>

Hello everyone

I want to draw 6 triangle with the help of linesysytem, I try to do it but I cannot see any line on my PG.  
this is my PG:  
[https://playground.babylonjs.com/#Q5QSKI#6](https://playground.babylonjs.com/#Q5QSKI#6) is it possible let me know where is my error and how can I do it?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [August 25, 2020, 9:21am UTC](https://forum.babylonjs.com/t/problem-with-linesystem/13655/2 "2020-08-25T09:21:40Z")

</div>

There are a number of problems:

- you push invalid data in myPoints (line 85)
- CreateLineSystem is expecting an array of array for the points (line 102)
- the position of the camera is wrong (line 108)

[https://playground.babylonjs.com/#Q5QSKI#7](https://playground.babylonjs.com/#Q5QSKI#7)

---

<div class="post-metadata">

**Author:** ![Arash\_Bagheri](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Arash\_Bagheri](https://forum.babylonjs.com/u/Arash_Bagheri)\
**Post date:** [August 25, 2020, 10:16am UTC](https://forum.babylonjs.com/t/problem-with-linesystem/13655/3 "2020-08-25T10:16:50Z")

</div>

Thank you so much @Evgeni_Popov  
in my project I have 120,000 points and the result must be like below picture:

 ![image_2020_08_20T12_23_57_152Z](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b8c9e808d2a0dd0891f1054dd10d868aeaa7ff99.jpeg)

but, when I tested this code in my final code with 120,000 points I just got the line like the line in my PG.

createLineSystem is a right way to get the final model?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [August 25, 2020, 10:32am UTC](https://forum.babylonjs.com/t/problem-with-linesystem/13655/4 "2020-08-25T10:32:12Z")

</div>

Your picture is an object made of triangles it seems, so you need to create triangles.

But most importantly, you must know the structure of your point list:

- why is it an array of a 4 vertex array in your PG?
- what those 4 vertices represent? A quad (meaning 2 triangles)?

Given the screenshot above, I would think your points are simply the altitude of a 2D tesselated plane, so only the Y coordinate matters. If that’s the case, you could use the Babylon heightfield object: [Height\_Map - Babylon.js Documentation](https://doc.babylonjs.com/babylon101/height_map)

To have a clearer view of your point list, I would create first a point cloud system: [Points Cloud Particle System - Babylon.js Documentation](https://doc.babylonjs.com/how_to/point_cloud_particles)

---

<div class="post-metadata">

**Author:** ![Arash\_Bagheri](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Arash\_Bagheri](https://forum.babylonjs.com/u/Arash_Bagheri)\
**Post date:** [August 25, 2020, 11:24am UTC](https://forum.babylonjs.com/t/problem-with-linesystem/13655/5 "2020-08-25T11:24:10Z")

</div>

> [@Evgeni\_Popov](#):
>
> Points Cloud Particle System - Babylon.js Documentation

the json file is in this form. each 4 vertex make one triangle it means the first vertex is equal to fourth vertex ( it’s somehow multipolygon).

how can I make triangle with four point?
