How to create this hex pattern?

Post questions on how to use or achieve an effect in Inkscape.
chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

How to create this hex pattern?

Postby chrisjj » Thu Feb 28, 2013 12:17 am

What's a good way to create a precise large-area pattern of which this is a sample

Image

starting with the numeric values of the dot diameter and dot pitch (marked), and the quantity of dots vertically and horizontally.

Precision is important so I want to avoid freehanding.

Thanks.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How to create this hex pattern?

Postby Lazur » Thu Feb 28, 2013 1:15 am

You can create tiled clones with the edit menu's create tiled clones option.
When the part you want to be tiled is drawn in a regular triangle, with a horizontal side at the bottom, you can use P1 symmetry,
rotating both columns and rows with 180°, and adding a -50% shift to the columns.
That will produce an accurate pattern.
If less accurate pattern is needed, you can draw one rectangular part of that pattern which can be tiled, and create a fill pattern from that. It doesn't work so well, but it is the way how inkscape can handle patterns.
Last edited by Lazur URH on Thu Feb 28, 2013 6:13 am, edited 1 time in total.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How to create this hex pattern?

Postby druban » Thu Feb 28, 2013 4:29 am

You can use this following method with pattern filling as well, but there is no GUI method yet for that. you will have to edit the xml pattern definition to change the size of the box...
rect8262.png
rect8262.png (59.36 KiB) Viewed 3909 times
Your mind is what you think it is.

chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Re: How to create this hex pattern?

Postby chrisjj » Thu Feb 28, 2013 9:54 am

Thanks, Lazur and Druban.

I find the clone tile method is inaccurate:

Image

The hexagon in the master tile was draw on the axonometric grid. Zooming in shows displacements between nodes that should be aligned.

Lazur, as you implied, I find the pattern fill method is inaccurate too:

Image

Both.SVGs are attached.
Attachments
Pattern inaccuracy.svg
(9.85 KiB) Downloaded 214 times
Clone tile inaccuracy.svg
(15.66 KiB) Downloaded 210 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How to create this hex pattern?

Postby Lazur » Thu Feb 28, 2013 10:26 am

Here is a tiled clone version with the pattern made into triangles.

That hexagon pattern you attached had 0,287 pixel inaccuracy, while with the triangle method threre are no inaccuracy displayed by the coordinate data, you can merge them together. The only problem with it is the displaying of the 0 width space between each part. It is possible to avoid that though with a different tile, I'll figure it out.
You can merge the clones together, they will produce the pattern you want, but with some unnecessary nodes.
Attachments
hlp2.svg
(17.53 KiB) Downloaded 227 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How to create this hex pattern?

Postby Lazur » Thu Feb 28, 2013 10:51 am

Changed the tile into a hexagon from the rectangle, this way the small hexagons don't have to be cut during the process.
hlp3.svg
(22.89 KiB) Downloaded 239 times


After creating the clones just remove the tiles background and replace them with one object that covers them all.
If that's even a bit too complicated, than the bounding box of the small hexagon should be set around the larger one, but I don't know how to do that.**

Edit:
Realised it still had a 0,073 pixel inaccuracy somehow, so recreated the thing.
The second version is how accurate inkscape can get.
Avoiding any reason to faults, these hexagons have the size of 100 and 150 pixels in height, and when they were cloned, they were put right into (0,0).

Edit2:
By cloning a group of objects, you are able to simply delete the background in the master tile, so there is no need to select all the background hexagons separately.
Attachments
hlp4.svg
(12.02 KiB) Downloaded 229 times
Last edited by Lazur URH on Thu Feb 28, 2013 8:34 pm, edited 3 times in total.

chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Re: How to create this hex pattern?

Postby chrisjj » Thu Feb 28, 2013 10:59 am

Lazur URH wrote:That hexagon pattern you attached had 0,287 pixel inaccuracy


Are you saying the master tile was inaccurate? I drew its hexagon on the axonometric grid.

Or are you confirming the Inskscape clone result introduced inaccuracy?

Thanks.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: How to create this hex pattern?

Postby Lazur » Thu Feb 28, 2013 11:14 am

One of the three white triangles in the clones wasn't in the right place. It was shifted 0,281 pixels in the one that I ungrouped.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How to create this hex pattern?

Postby druban » Thu Feb 28, 2013 7:03 pm

I'm not sure you understood what I was saying about the 'saved size and position of tile' checkbox, because that feature specifically is there so you DON'T have to use all these little triangles once you have defined a tile size...

For hexagons the tilesize has to be.... (EDIT :oops:) 1: 3^1/2 (1 : sqrt3) 2: 3^1/2 (2 : sqrt3)

Here are 3 screenshots of the same file with the hexagon being scaled. the guides are there to show that the relative positions in the clones remain true.
the dotted line shows the tile size and shape. The rectangle could actually be deleted from the group without affecting the outcome. Note that this is for the PG symmetry. It's really the only symmetry that will work for this without transformations added.
Anyway I'm glad you have it working to a certain extent anyway with the other methods ... Good luck!
2013-02-28_024206.png
2013-02-28_024206.png (17.74 KiB) Viewed 3806 times
2013-02-28_02427.png
2013-02-28_02427.png (14.13 KiB) Viewed 3806 times
2013-02-28_024278.png
2013-02-28_024278.png (11.44 KiB) Viewed 3806 times
Your mind is what you think it is.

chrisjj
Posts: 153
Joined: Thu Jan 17, 2013 10:45 am

Re: How to create this hex pattern?

Postby chrisjj » Fri Mar 08, 2013 11:06 am

druban wrote:I'm not sure you understood what I was saying about the 'saved size and position of tile' checkbox, because that feature specifically is there so you DON'T have to use all these little triangles once you have defined a tile size...


Thanks. I kept the triangles so that I could change the pitch post-cloning. IIUC, the 'saved size and position of tile' checkbox references a saved size that is hidden i.e. uneditable.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: How to create this hex pattern?

Postby flamingolady » Sat Mar 09, 2013 9:27 am

I'm wondering - wouldn't align and distribute get the job done and be equally distributed as well?


Return to “Help with using Inkscape”