The pattern as a border problem
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
The pattern as a border problem
Lets say i want to make a border from a pattern. This is easy as long as the shape of my border is a square, but as soon as i have a rectangle that is made of two sides that are not a multiple of my pattern it gets problematic.
Basically i need a grid and careful pre-planning, right ?
For my example i used the basic A4 template in landscape format. My pattern is 30x30, 30px from the edges.
Obviously the math wont work on this.
Basically i need a grid and careful pre-planning, right ?
For my example i used the basic A4 template in landscape format. My pattern is 30x30, 30px from the edges.
Obviously the math wont work on this.
- Attachments
-
- Borderproblem.png (16.97 KiB) Viewed 2672 times
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
I guess i kind of answered the question by myself (grid and pre-planning).
But still, how would i find the correct patternsize for the above example ?
What i need is a common divisor for both, the horizontal and vertical pixelsize, that is a full number, right ?
How would you do that mathematically ?
But still, how would i find the correct patternsize for the above example ?
What i need is a common divisor for both, the horizontal and vertical pixelsize, that is a full number, right ?
How would you do that mathematically ?
Re: The pattern as a border problem
I'll leave the maths to Lazur
For an alternative: can you use CSS? There's an option that stretches the border patterns if they don't fit exactly...
https://css-tricks.com/almanac/properti ... der-image/
For an alternative: can you use CSS? There's an option that stretches the border patterns if they don't fit exactly...
https://css-tricks.com/almanac/properti ... der-image/
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
Moini wrote:I'll leave the maths to Lazur
Good to hear, i was just beginning to question my intelligence, lol
For an alternative: can you use CSS? There's an option that stretches the border patterns if they don't fit exactly...
https://css-tricks.com/almanac/properti ... der-image/
No i cant. Isnt CSS for programming websites ?
Also i dont want the pattern to be stretched.
Re: The pattern as a border problem
In general you need to adjust the pattern's length to the A4 format. Would use mm units for easier calculations.
For a continuous repeating the circumference has to be divided to equal lengths, 120 would fit in scale to the 30 px.
That would call for a 8,45 mm (1014/120) long pattern ~~29,941 px.
But that's right, all the corners at once cannot be tessellated with the pattern's starting/ending.
You need to make a compromise.
Like you can make the overall A4 shape symmetric to horizontal and vertical axises if the tessellation starts at the middle of the side
(with 120 repeats at least, 119 wouldn't fit for this choice).
Or have two "nice" corners diagonally without an axis-symmetric result.
For a continuous repeating the circumference has to be divided to equal lengths, 120 would fit in scale to the 30 px.
That would call for a 8,45 mm (1014/120) long pattern ~~29,941 px.
But that's right, all the corners at once cannot be tessellated with the pattern's starting/ending.
You need to make a compromise.
- Change the layout from A4 format-, like 211,25 mm / 295,75 mm would fit with 120 samples. OR
- Decide in which phase you will break the pattern sample.
- OR don't care much about the small imperfection, eyeball it and stretch one of the samples/use the pattern along path lpe already.
Like you can make the overall A4 shape symmetric to horizontal and vertical axises if the tessellation starts at the middle of the side
(with 120 repeats at least, 119 wouldn't fit for this choice).
Or have two "nice" corners diagonally without an axis-symmetric result.
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
Hm, i think i get it.
But from a conceptual point of view, i find it very hard to pull off.
But from a conceptual point of view, i find it very hard to pull off.
Re: The pattern as a border problem
Off topic:
No i cant. Isnt CSS for programming websites ?
Inkscape uses inline CSS in the style attribute of every object, and on the web, you can even style your SVGs using an external .css file: http://tavmjong.free.fr/INKSCAPE/MANUAL ... Style.html
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
Im wondering if the Stitch Sub-Paths LPE could be helpful as a measurement tool. Every time four sub-paths hit the corners, you found a pattern to work with.
(My initial idea was to divide an angled path (a half so to speak) with the Add Nodes Extension, but that didnt work.)
(My initial idea was to divide an angled path (a half so to speak) with the Add Nodes Extension, but that didnt work.)
- Attachments
-
- helper.png (15.82 KiB) Viewed 2571 times
Re: The pattern as a border problem
Good idea on displaying a dividing, but it won't be possible to hit every corner at once when using an A4 layout.
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
Because it divides the sides in equal long distances and theoretically the width/height ratio of A4 format is one/square root two, which is irrational.
Since the values are rounded you can try by dividing in the least common multiple number of 210 and 297. But would that really work?
Way more than 120 repeats.
297=3*3*3*11,
210=3*7*10;
--->least common multiple=3*3*7*10*11=6930, meaning the pattern should be (210+297)/6930~~0,73 mm long.
in svg
Since the values are rounded you can try by dividing in the least common multiple number of 210 and 297. But would that really work?
Way more than 120 repeats.
297=3*3*3*11,
210=3*7*10;
--->least common multiple=3*3*7*10*11=6930, meaning the pattern should be (210+297)/6930~~0,73 mm long.
in svg
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
I doubt if I can give you a good answer. I run into this problem a LOT, since I enjoy drawing border patterns. My solution is to let the pattern unit dimensions determine the page size.
But if you want to do the math, you could scale the pattern unit to the right size, that will fit any page size you want.
Actually....are you talking about a pattern fill, or just combined paths? I wouldn't use a pattern fill for a border....just my personal preference, I guess. But you could.
(hhmm.... ....look for a border pattern challenge/contest at Inkscape Community, in the next couple of weeks )
But if you want to do the math, you could scale the pattern unit to the right size, that will fit any page size you want.
Actually....are you talking about a pattern fill, or just combined paths? I wouldn't use a pattern fill for a border....just my personal preference, I guess. But you could.
(hhmm.... ....look for a border pattern challenge/contest at Inkscape Community, in the next couple of weeks )
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
brynn wrote:But if you want to do the math, you could scale the pattern unit to the right size, that will fit any page size you want.
Thats still a math problem.
Actually....are you talking about a pattern fill, or just combined paths? I wouldn't use a pattern fill for a border....just my personal preference, I guess. But you could.
Not a pattern fill. Actually, i never use that.
A pattern in the sense of a design, But could be as simple as a square/rectangle/circle, etc.
Re: The pattern as a border problem
Are you asking for a non-math way to scale patterns to fit a given page size? I don't think you can avoid the math completely. I was thinking you could create a custom grid, but you'd need some math to figure out the custom grid.
I'll bet there's some kind of tool...somewhere...on the internet, that will do the math for you!
Edit
Well actually, the math wouldn't be very hard. Just take your page size and divide by the number of units you want to use.
I'll bet there's some kind of tool...somewhere...on the internet, that will do the math for you!
Edit
Well actually, the math wouldn't be very hard. Just take your page size and divide by the number of units you want to use.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
The point of this thread is the concept side of things. The design.
Lets say i want to do a card. Its A4 (or whatever).
I have to work with a fixed size.
I want a border and i have to design a pattern.
As you can see above, thats a complex matter when you have two different sides.
EDIT:
or look at this pattern, try to fit this into a design for an A4 page size.
Lets say i want to do a card. Its A4 (or whatever).
I have to work with a fixed size.
I want a border and i have to design a pattern.
As you can see above, thats a complex matter when you have two different sides.
EDIT:
or look at this pattern, try to fit this into a design for an A4 page size.
Re: The pattern as a border problem
I don't think that would fit into an A4 page -- it's too long and too narrow.
For me, I would figure out what part is the pattern unit. I wouldn't figure it out like this, but the attached is just to show the unit. But for example, that rectangle pretty much determines the unit size.
First, I would decide whether there's going to be any margin between the border and edge of the page. Then I would take the page height and divide by the unit width, to find out how close it is to fitting. Do the same for width. And note that if there's a margin, you would use the margin size, rather than the page size. Then I would scale the unit so that an even number (whole number) of units fits. How do I know what size to scale to?
! I wonder if Moini's extension could be used for this?? ....rats, what did I do with that link? I'll post back as soon as I find it.
For me, I would figure out what part is the pattern unit. I wouldn't figure it out like this, but the attached is just to show the unit. But for example, that rectangle pretty much determines the unit size.
First, I would decide whether there's going to be any margin between the border and edge of the page. Then I would take the page height and divide by the unit width, to find out how close it is to fitting. Do the same for width. And note that if there's a margin, you would use the margin size, rather than the page size. Then I would scale the unit so that an even number (whole number) of units fits. How do I know what size to scale to?
! I wonder if Moini's extension could be used for this?? ....rats, what did I do with that link? I'll post back as soon as I find it.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
Well actually the image comes from this thread:
viewtopic.php?f=6&t=21708&start=25
and the pattern goes like this (but you also need a cornerpiece)
viewtopic.php?f=6&t=21708&start=25
and the pattern goes like this (but you also need a cornerpiece)
Re: The pattern as a border problem
Here it is: https://github.com/Moini/inkscape-realscale-extension/ Instead of resizing an architectural drawing, couldn't you resize the pattern border?
Oh, ok about the pattern unit. But you get the idea.
Oh, ok about the pattern unit. But you get the idea.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
I dont understand how the extension is supposed to help. Isnt that some kind of ruler tool ?
Re: The pattern as a border problem
Yep. Isn't that what you need?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
Do i ?
I guess what i want is not doable.
My goal is to fit a certain pattern into a defined area.
Lazur already answered what the options are.
I guess what i want is not doable.
My goal is to fit a certain pattern into a defined area.
Lazur already answered what the options are.
Re: The pattern as a border problem
Well, to be honest, I'm not sure if it would work. My brain's still a bit addled by flu. But it seems like it should by theory. I was hoping you'd be able to put it to use. But maybe it's not quite right. Ohh, I've got it now. What you need is the opposite of that. Instead of having the size of a unit, and scaling everything to that size, you have the size (page size) and you need the units scaled to fit.
Well still, just like that extension, I wouldn't be surprised if there's some kind of tool, somewhere on the internet, that will do the math for you. But my energy's a bit too limited to search right now.
This is why I don't set a page size, when I make a pattern border. I let the pattern determine the size of the page. (Of course I only do it all for fun. If it was my day job, I'd purchase the right kind of tool to do the calculations. Hhmm.....not that I know how to use one, but isn't this how a sliderule works?)
Well still, just like that extension, I wouldn't be surprised if there's some kind of tool, somewhere on the internet, that will do the math for you. But my energy's a bit too limited to search right now.
This is why I don't set a page size, when I make a pattern border. I let the pattern determine the size of the page. (Of course I only do it all for fun. If it was my day job, I'd purchase the right kind of tool to do the calculations. Hhmm.....not that I know how to use one, but isn't this how a sliderule works?)
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: The pattern as a border problem
The frame is to work with a certain size and thats the problem at the same time.
So either the math just works, or you have to "cheat" a bit.
Stretch or compress the pattern slightly to make it fit.
If there wasnt the problem of a fixed size, it would be easy, as you said.
In my example that wouldnt be too bad.
So either the math just works, or you have to "cheat" a bit.
Stretch or compress the pattern slightly to make it fit.
If there wasnt the problem of a fixed size, it would be easy, as you said.
In my example that wouldnt be too bad.
- Attachments
-
- tostretchornottostretch.png (23.97 KiB) Viewed 2405 times
Re: The pattern as a border problem
Personally I don't think the certain size is that strict. Even the standard containing the page sizes deals with the size of the error, there is ±2.0 mm tolerance for dimensions in the range 150 to 600 mm.
Also the mentioned printing to paper edge problem, some margin would need to fit in for a safe area.
On the pattern, it much looks like trochoids made with the spirograph extension. Probably you can use the parametric curves extension too to generate that.
Also the mentioned printing to paper edge problem, some margin would need to fit in for a safe area.
On the pattern, it much looks like trochoids made with the spirograph extension. Probably you can use the parametric curves extension too to generate that.