# Reordering points when they're not in a grid

**URL:** <https://discourse.mcneel.com/t/reordering-points-when-theyre-not-in-a-grid/98888>\
**Category:** Grasshopper\
**Created:** [March 27, 2020, 4:00am UTC](https://discourse.mcneel.com/t/reordering-points-when-theyre-not-in-a-grid/98888 "2020-03-27T04:00:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abeebe39](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/abeebe39/32/146285_2.png) [@abeebe39](https://discourse.mcneel.com/u/abeebe39)\
**Post date:** [March 27, 2020, 4:00am UTC](https://discourse.mcneel.com/t/reordering-points-when-theyre-not-in-a-grid/98888/1 "2020-03-27T04:00:52Z")

</div>

This is my first post here, so hopefully someone can help me out. I’ve looked everywhere I can for a solution…

I have a mesh I’ve created from a bitmap image. As you can see from the image attached, I’ve deconstructed it and connected the resulting points with a repeating line pattern that goes mostly in a horizontal direction. This is an excellent start and exactly what I want for the first pass. But then I get stuck:

I’d like to interpolate a line on the same set of points, but have the lines go in a few different directions - 30-degrees, 60-degrees, and 90-degrees from the current set. I have a basic understanding of components like Flip Matrix and Relative Item, which I assumed would help me, but I can’t see the way forward. How can I reorder the points so they count in different directions. Can anyone advise?

 ![Screen Shot 2020-03-26 at 11.01.33 PM](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/1/71571775008cca2bbeb105e6f4979f403b91acc1.png)  
 ![Screen Shot 2020-03-26 at 10.58.02 PM](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/a/6/a62e78b0b5a6dc9fc9e7aeda959d4af407d0559a.png) [Turn\_these\_lines.gh](https://discourse.mcneel.com/uploads/short-url/7PX029VZFOvjybp0OCVWyqa4QM1.gh) (666.4 KB)

---

<div class="post-metadata">

**Author:** ![Mahdiyar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mahdiyar/32/472862_2.png) [@Mahdiyar](https://discourse.mcneel.com/u/Mahdiyar)\
**Post date:** [March 27, 2020, 1:00pm UTC](https://discourse.mcneel.com/t/reordering-points-when-theyre-not-in-a-grid/98888/2 "2020-03-27T13:00:55Z")

</div>

![PointsOrder](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/1/e138b9c0984341241e8bd65104aadf83ad817b01.png)  
[PointsOrder.gh](https://discourse.mcneel.com/uploads/short-url/yDt4O9QHI2pJFzt4veBV1flUXxr.gh) (93.3 KB)

---

<div class="post-metadata">

**Author:** ![abeebe39](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/abeebe39/32/146285_2.png) [@abeebe39](https://discourse.mcneel.com/u/abeebe39)\
**Post date:** [March 27, 2020, 10:32pm UTC](https://discourse.mcneel.com/t/reordering-points-when-theyre-not-in-a-grid/98888/3 "2020-03-27T22:32:54Z")

</div>

Thanks @Mahdiyar.

I think I see what you did to straighten those out. Maybe you can walk me through it very briefly just in case?

I still don’t quite see how I’m going to get those lines to run along different vectors though. I thought, if I could make it into a grid with u v coordinates, I could use Relative Item to connect points in different rows, but I can’t seem to do any of that - and I imagine there’s a more straightforward method.

If I wasn’t clear earlier, I’m looking for something somewhat like this (done in illustrator, so apologies if it’s a little wonky):

 ![Screen Shot 2020-03-27 at 5.28.48 PM](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/1/c/1ce4bd83aa14c1047dc6bb5c720b778f2f9a9191.png)

Maybe there’s a cleaner way to get an outline from this collection of points than Convex Hull, which doesn’t do any of the interior contours of the shape. Then I could run a line through the points on the boundary?
