Comments (12)
Hi @tatyanade , there's no need to call it, theoretically it is already turned on for all strokes in TANGENT mode (not for CONCENTRIC fill yet, because the implementation is a bit different)
See the heart in PEmbroider_bitmap_image_1 example
from pembroider.
Hi @golanlevin
Now concentric fill is also given the staggering. I noticed your muybridge demo's concentric fill looks very aligned so I added that :)
There's now an option called CONCENTRIC_ANTIALIGN. When set to 0, no staggering will be done. When set to a positive float, it will be treated as angle in radians (θ in image below), turnings that are steeper than this will be kept. Default is 0.6 ≈ 35°
C
/
/
/ θ
A-------B. . . . . . . . . . . . . . . .
from pembroider.
Hi @golanlevin
I think main reason the stitches in the photograph look very aligned is that the stitch length is long compared to the length of the segment in the polyline. If we draw a larger shape with smaller stitch length, only the ones at end points of segments will be aligned, and all the other points that come from resampling will be randomized and not aligned.
From issue #17, looks like we'll drastically increase the size of everything? Perhaps by increasing the ratio of unit per pixel? Wondering if that would solve this issue automatically?
from pembroider.
Hi @LingDong- , I'd rather use a proper geometric solution than rely on getting lucky with scaling effects. Why can't we just slide the "start point" of even-numbered contours forward by half a stitch length, and then resample the contour from there? (While possibly retaining points of very high curvature.)
from pembroider.
Hi @golanlevin , that's what I was trying to describe in the first paragraph (and the illustration). However I was saying half segment length instead of half stitch length to maximize the offset (like we did with the parallel stitch resampling)
It's not "getting lucky with scaling" though. It's simply the resolution of the polyline is higher than that of the stitches, which will be definitely solved by increasing the scale.
from pembroider.
corner-aware half-segment-length staggering added in a2df276
from pembroider.
Magnificent — thank you, Lingdong. @tatyanade , please test?
from pembroider.
Hi @LingDong- I'm confused as to how to call this, I see the edits to the strokePolyTangentRaster but am not sure how to call it so it uses the staggering
from pembroider.
Tested with spacings of 1,2,3,4,5
Had some weird issues with spacing of 3; you can see in the png render there are a lot of stitches in the center of the crack, which piles up in real life.
Did the same test with a different heart & it gets a bit crowded in the center of the crack near sharper corners but not as much as spacing3 on the original image does
from pembroider.
@tatyanade , those long straight stitches on the left side of the heart — I assume you're aware that you can adjust those with the setStitch() function, any reason you made them so long?
In general, do you think the staggered stitches for TANGENT strokes are working well?
The pile-up on my broken heart could reasonably be considered a fault of my design — or do you disagree with that?
from pembroider.
@tatyanade @golanlevin oops, the really long stitches is likely due to my enabling of toggleResample(false)
in PEmbroider_bitmap_image_1
to test/showcase the new staggering algorithm
from pembroider.
Hi @LingDong-
Staggering gets eliminated at some point when two shapes are culled - visable in lower part of circles on the left - both are parallel hatch with hatch spacing of 2 and second one is sapcing of 4
from pembroider.
Related Issues (20)
- compile with Eclipse HOT 3
- non-closed shapes with E.strokeMode(E.PERPENDICULAR) have connecting line HOT 2
- under layer support stitch HOT 1
- Request toggle to enable/disable generation of connecting lines HOT 3
- .jef file format causes machine confusion HOT 1
- Jump stitches not being cut, but stitched HOT 9
- no menu preview (but editor preview!) of .pes files on the Brother NV800E
- SVG Export leave connecting lines between shapes HOT 1
- Concentric fill error on imported images
- Optimize function altering colors
- Potentially helpful sizing function
- In PEmbroider_lines_1.pde example, the bobbin thread gets tangled HOT 4
- .jef file displays badly on machine HOT 2
- simple E.rect problem HOT 2
- Inaccurate license information HOT 4
- layer names as metadata HOT 1
- option to avoid small bridge stitches HOT 10
- culling question. HOT 3
- getting access to PEmbroiderGraphics polylines HOT 2
- satin hatching does not catch all polygons HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pembroider.