christiansiegel / knitter

Generate a circular knitting pattern from a picture.
MIT License
137 stars 30 forks source link

Can thread thickness be visualized? #15

Closed LEBMD closed 2 years ago

LEBMD commented 2 years ago

i'm using the tool and absolutely loving it, but I'm wondering if there's a way to edit line thickness, or if you have a suggestion on choosing thread thickness based on the diameter of the frame

christiansiegel commented 2 years ago

Great to hear! I've successfully used "regular" black sewing machine thread on a circle with 0.8m diameter and ~4500 lines.

What you could theoretically do to simulate a thicker thread:

Let me know if that helped 😉

LEBMD commented 2 years ago

didn't think you'll answer, and definitely not this fast! thank you

I have thicker threads than the regular sewing ones, and using a 0.4m frame was using points one and three in your response i know no JAVA at all, but i was messing a bit with the drawString function. increasing "strokeWeight" caused the lines to be blurry so i changed the noFill() to fill(30) and that made the lines a bit more crisp

void drawStrings() {
  stroke(0, opacitySlider.value);
  strokeWeight(1.3);
  fill(30);

but I was wondering if there is a more consistent way to change the thickness

Decreasing the size from 700 to 500, and increasing strokeWeight from 1 to 1.2, did exactly what I want the results are coming out exactly as the actual portraits I previously tried!

christiansiegel commented 2 years ago

Oh, true. Didn't think about the strokeWeight 😄

Thanks for your input. I'll leave this issue open for when I'll find the time to maybe make that setting a bit more accessible.