# Merging tiles into paths

**URL:** <https://discourse.processing.org/t/merging-tiles-into-paths/44670>\
**Category:** Project Guidance\
**Created:** [July 1, 2024, 11:07am UTC](https://discourse.processing.org/t/merging-tiles-into-paths/44670 "2024-07-01T11:07:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 1, 2024, 9:21pm UTC](https://discourse.processing.org/t/merging-tiles-into-paths/44670/2 "2024-07-01T21:21:58Z")

</div>

Hello @eightohnine,

This inspired me to write some related code to generating a path.

This may be something in here of interest in your research:

> [@Shape generator help (Armin Hofmann's 'rubber band' shape generator)](https://discourse.processing.org/t/shape-generator-help-armin-hofmanns-rubber-band-shape-generator/33190/1):
>
> Hi I’m trying to create a Hofmann’esque shape generator based on a grid of circles: I have the basic structure of the grid done, but I’m totally stuck on where to go from here? How do I make this into a combined shape? Here’s my code so far: color bg = #FFFFFF; color fc = #000000; void setup() { size(800, 800); frameRate(2); } void draw() { background(bg); noStroke(); float tilesX = 4; float tilesY = tilesX; float gap = 16; float tileW = …

> [@10 print chr$(205.5+rnd(1)); : goto 10](https://discourse.processing.org/t/10-print-chr-205-5-rnd-1-goto-10/15483):
>
> 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 Can this be done in Processing? grin@jeremydouglass

The last one is generating mazes and inspired me to solve a maze by looking ahead to see what was in the way and making a decision based on that. A lot of interesting and related stuff may come up in a maze related search.

In one example of code I simply looked ahead to see if there was a pixel color change. In others I kept track of nodes on a grid (where I have been) in an array and checked array to see if something was ahead.

> [@eightohnine](#):
>
> I’m guessing this could be achieved by passing velocity and direction PVectors into the agent.

Thinking about it already I am, green eggs and ham!

Pick a random direction from your current direction and look ahead and draw your \*curves! It should be simple enough to check nodes in the path; the nodes being stored in an array. Since these are tiles the nodes can represent each tile.

\*According to one source _a line is a curve without any curvature_. `:)`

I do not have any algorithms or approaches to suggest for this as I generally code from scratch to engage my brain and then may look at other approaches.

Have fun!

`:)`

---

_[View the full topic](https://discourse.processing.org/t/merging-tiles-into-paths/44670)._
