My solutions was to create noise line and then replicate that line with translate. I don’t know maybe the solution is wrong. Any help would appreciated
Thanks!
For the first point maybe try to increase then decrease the noise value based on the x coordinates.
For example if your width is 600 , increase the noise value from 0 to 300 and then decrease it from 300 to 600.
For the second point, I would suggest to mix the x and y coordinates (adding or summing them) when computing the 2D noise value.
Example sketch in Processing Python mode (needs a lot of improvements and fine tuning) :
def setup():
size(600, 800, P2D)
background("#F3F3F5")
strokeWeight(2)
smooth(8)
points = []
edge = 10
step = 10
res = (height - (edge*2)) / step
nLines = ((width*2) - (edge*4)) / step
factor = .001
off = 0
x2 = 0
for i, x in enumerate(xrange(edge, (width*2) - edge, step)):
if x > width:
x2 -= step
off += step
else:
x2 = x
for y in xrange(edge, height - edge, step):
n = noise(x2 * factor * 1.5, (x+y) * factor)
if i > 10 and i < nLines - 10:
points.append(PVector(off + x2 * n, y ))
for i in xrange(len(points)-1):
if i%res != (res-1):
line(points[i].x, points[i].y, points[i+1].x, points[i+1].y)
Thank you so much @solub ! Your sketch is amazing. I am studying your code for a week now. Something that I am still doesn’t understand is this line of code if (id % res != (res - 1)) { would you mind to explain to me what is that mean by this?
If you want to draw a line you need to connect the first vector to the second, the second to the third, the third to the fourth, and so on until you reach the end of the array. However, if you do so, the last point of the first line will be connected to the first point of the second line, and this for each line.
Ohhh… THANK YOU! Great explanation and crystal clear for me @solub
This new logic using res is very clever. I am sure I can use it to tweak another problem.