alyyousuf7 / Weaver

Weaving algorithm based on work by Petros Vrellis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README Clarifications & Project Help

rykener opened this issue · comments

Hey @alyyousuf7, thank you for providing your code for this!

I would like to use this to create a portrait and I have a couple of questions that would make it an easier process for me. I would be very grateful if you had the time to answer them.

  1. Where is point 0 located? (very top?)
  2. Is point 1 clockwise or counterclockwise from point 0?
  3. When constructing the frame, how large is it intended to be? Seems related to the next question:
  4. How might drawAlpha relate to the thickness of thread used in real life?
  5. Can you explain the intention behind jump? I'm getting very different results from changing it, but I don't fully understand why.
  6. Does removeColor do anything if the image is already black and white?

Thanks!

OK I have some uncommitted changes in my repository that will answer some of your questions (I don't know when I made those changes and forgot to commit?)

Let me push that and come back to you.

So now for your questions.

  1. It starts from top (It's now visible as the brightest red dot)
  2. It goes clockwise (I have made more visible with gradient)
  3. It not intended for any particular size. You can theoretically make whatever size you want. You can set drawAlpha and removeColor to simulate your size. In a bigger frame or a thin thread, you might want drawAlpha and removeColor to be low.
  4. drawAlpha is the variable which tells that when drawing a line, on left side, how much the opacity of that line should be. After the line is draw on left side, the same line is removed from the right side. And removeColor tells how much lighter that line should get on the right side.
  5. So it is possible that the line is drawn from point 1 to point 2 because of the darkest region. Since the points will be so close, probably the effect that we're trying to display using threads, might not be fruitful. So jump lets you set a minimum distance between two consecutive points. If set to two, line cannot be drawn from point 1 to point 2 or point 3... It will be draw at least at point 4.
  6. Yes it does. Read above. The image is converted to grayscale anyway.

I hope I answered your questions. Let me know if there's still any confusion.

Take the latest pull. I just pushed something which will answer your first two questions more clearly.

Awesome! Thank you for taking the time to answer this stuff. This makes things more clear, and also explains the artifacts I'm getting (due to jump being too high). I will post the woven image when I create it, hopefully within the next couple months.

I have made several portraits with the code, and it works great. But I wonder if it is possible to make a color variant. Like this one from Petros Vrellis: https://www.saatchiart.com/art/New-Media-Color-knit-4-Limited-Edition-1-of-4/858823/3885295/view

Not yet. But I'd love a PR if you can work on it!

@Panda0003 I started working on this several times but have continued to run into performance issues. Any progress?

BTW, I haven't finished the real world version of the portrait I made with this code, I'm about 1/3 through stringing it up, but it looks GOOD.

@Panda0003 How to change the image is the best effect?

Let's open up another issue and discuss it over there..