Creating a knitting pattern of an image

Hallo,

first I want to explain my question. I have an digital image, which I want a pattern of it by creating lines in a specific rectangular. 

The dimension of the image and the regtangular is 3:4. 

The boundary of each  side is divided by several points. So the endpoints of the lines which should create the pattern shell cross these points.

In the attachment there is an example of what I want to create.

It would be great if anybody can help me

THX

Load Previous Replies
  • up

    Laurent DELRIEU

    After one week, here is a quite proper solution to your problem. The most difficult part was optimisation as some method for Bitmap are quite long, here it was GetPixel. I first use a fast method but which not so fast. See in the code the references. 

    Hot to use the tool 

    1. Put "Calculate" to false => no calculation
    2. Select the filepath of your image, this image will be drawn as a mesh on the canvas
    3. Draw the points of the loom, me I use a curve for that
    4. Choose the number of iterations 
    5. The Image width in pixels is the size used for image calculations (200 pins, 200 pixels, 400 iterations = 1.3 min, 200 pins, 570 pixels, 2000 iterations = 2.3 h)
    6. Alpha if for line drawing is used to mimic less than one pixel line
    7. method 1 : choose the line where there is the biggest proportion of black
    8. method 2 : choose the line where there is the longest proportion of black

    Click Calculate, experiment. Normally Escape could work to stop the calculations

    5
  • up

    Laurent DELRIEU

    I suppressed the definition. There are many programs that do the same on the internet !
    • up

      Parametric Box

      Hello, did you find what you were looking for? could you share? I beg)

      regards

      2