1

I'm trying to implement the LineTrace algorithm described in this article:

Linetrace Generative Art

Particularly where it says:

To trace the outline you can sample some of the nearby edges on the previous line, calculate the average direction of those edges and add a vertex to the current line along that direction. Then add some random motion to mimic free hand drawing. This seems to work quite well for a while, but there is some "inertia" that can be seen in the results—the shape adapts too slowly.

The amount of noise you add to each vertex is crucial. This noise is what drives the whole system to make interesting shapes since the tracing behaviour is always forced to attempt to replicate both the general movement and some of the random jitter as it progresses.

I'm trying to do this in processing, and since I'm new to processing and hazy on how vectors, edges and directions work, I don't have any idea how to start to code. I would be greatly appreciative for some sample code, anything to help me get underway. I'm also curious by what he means by "add some random motion to mimic free hand drawing", is he incorporating perlin noise somehow? Thanks in advance.

pintee
  • 119
  • 1
  • 10
  • 1
    If you're not sure where to start, just get a processing sketch that draws a single line. This should be achievable from any processing tutorial along with the docs. Then add multiple vertical lines. Only then are you ready to worry about adding random motion. At that time, make an attempt (yes, probably using perlin noise) and post your code along with a concrete question if you get stuck. Thanks. – ggorlen Jul 13 '22 at 18:16

0 Answers0