Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Satins - extra parameters vs Grouping (beta4.2.7) #215

Open
Neon22 opened this issue Dec 18, 2024 · 5 comments
Open

Satins - extra parameters vs Grouping (beta4.2.7) #215

Neon22 opened this issue Dec 18, 2024 · 5 comments

Comments

@Neon22
Copy link

Neon22 commented Dec 18, 2024

I did the following in an attempt to make a Satin generator that would create a balanced satin (suitable for some kinds of weaving), and its inverse so that floats are minimised when using them both in a pattern.
Satins-5_3 groupedd-beta

You can see that several transformations are needed to create the balanced satin and its inverse.
I considered if there was a grouping element then you could box these into a single Satin box that would have three possible outputs.
Here simulated using the V1 interface:
Satins-5_3 grouped

However the shift will be different for each of the satins (although it can be calculated)
Here we can see that a 5_2 satin has an added weft shift of 1 - so we can't simply copy a parameter between ops.
Satins-5_2 balanced

This perhaps argues for a dedicated Satin generator with special internal code (so the added weftshift doesn't have to be adjusted everytime you change the Satin shift value). Smaller on-screen as well.
Note that satins of 4,6 are sometimes referred to as Irregular Satins but they are really broken twills. However leaving them in "Satins" does simplify how to think about it.

Perhaps this would also have a shaded output for the weft/warp density increases, or a special shaded operator (I see a similar op in v1) which would also work for twills (also frequently used for shading), and maybe a general case solution to support other weave structures.

@Devendork
Copy link
Member

This is interesting. I have imagined some kind of grouping feature but haven't gotten there yet. I do like your sketch and how you are thinking about it. Do you have a text reference I might be able to refer to on creating well structured inverse satins?

@Neon22
Copy link
Author

Neon22 commented Dec 28, 2024

I have taken the opportunity afforded by this discussion to muck about with a Satin generator.
Creates regular and irregular satins for a given dimension.
I'll also work out the adjustments to make balanced ones.
Should be able to give you the algorithm (python) or at the very least, a list of all values to look up.

Here's an experiment using the balanced satin and inverse for nicely controlled floats.
v4 2 6 skull satin5_3 balanced

Also seems like a mod of your satin-shading generator could make shadings of an input and then end up with a sequence of N patterns representing increasing/decreasing density. This could make a good input to an image_map variant that took a grayscale shaded image and mapped the patterns on basis of an error diffusion algorithm. Could make nice results. Here's a thing on error diffusion - https://tannerhelland.com/2012/12/28/dithering-eleven-algorithms-source-code.html

Could also try making a twill shading or a general shading variant for any arbitrary weave.
I'll keep you posted. Happy Christmas

@Neon22
Copy link
Author

Neon22 commented Dec 28, 2024

satin refs. I dig around in here mostly:

@Neon22
Copy link
Author

Neon22 commented Jan 1, 2025

OK. Got most of it working pretty well:

  • enter size and regular or irregular.
  • if regular - get the step back and all the tileable offsets (Hmmm. something not quite right here)
  • if irregular - get back a list of them all (heaps)
    So going to have to do the irregulars as a live calc. Regulars could be looked up for speed

There's a tiling error. Looking into it. More soon.

So far:
Irregular Satins:
3=1,
4=6,
6=6,
7=42,
8=352,
9=3102,
10=29924,
11=315854,
12=3628904
Need to calc everything on the fly above 7

Regular Satins:
5=2 [5_2 (3), 5_3 (1)] ,
7=4 [7_2 (3,4,5), 7_3 (1,4,5), 7_4 (1,5), 7_5 (1,2,3)],
8=2 [8_3 (1,4,5,6) 8_5 (1,2,3,6)],
9=4 [9_2 (3,4,5,6,7), 9_4 (1,2,5,6,7),
9_5 (1,2,3,6,7), 9_7 (1,2,3,4,5)],
10=2 [10_3 (1,4,5,6,7,8), 10_7 (1,2,3,4,5,8)],
11=8 [11_2 (3,4,5,6,7,8,9), 11_3 (1,4,5,6,7,8,9), 11_4 (1,2,5,6,7,8,9),
11_5 (1,2,3,6,7,8,9), 11_6 (1,2,3,4,7,8,9), 11_7 (1,2,3,4,5,8,9),
11_8 (1,2,3,4,5,6,9), 11_9 (1,2,3,4,5,6,7)],
12=2 [12_5 (1,2,3,6,7,8,9,10), 12_7 (1,2,3,4,5,8,9,10)],
13=10

Might not need to calc regulars on the fly but tiling not always mirroring... yet...

@Neon22
Copy link
Author

Neon22 commented Jan 12, 2025

OK there is no algorithm which will generate an inverse for a given balanced satin by any combination of shifting/rotating/flipping/inverting of the balanced satin. There are shortcuts for small satins.

There may also be several solutions to the balanced inverse as the satin gets larger (more internal possibilities for satin swaps not located on edges).
Gets pretty big in terms of numbers.

However not difficult to filter on basis of desired points.
Working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants