Jump to content
You must now use your email address to sign in [click for more info] ×

How to expand/inflate shapes with collision?


Recommended Posts

Hello!

Designer_RWEuUKybAa.png.a136a92012e7b9d39fc9fabb5701a110.png

 I have this grid of dots that I want to expand, so they take up all the white space between them, while not colliding into eachother (which means they won't be circles anymore, but weird hexagon-ish shapes, depending on how many neighbors they have, except the outermost circles that would still be circles on the outside, albeit bigger ones). Kinda similar to what Substance Painter does with unused parts of the texture, so there are no seams around the edges, but in vector.

Basically divide the white space to the objects evenly, while keeping them separate objects, so I can color them differently and make a mosaic.

Does anyone know what this "technique" is called so I can search it better or know a way to achieve it in Designer?

 

Thanks in advance!

Link to comment
Share on other sites

I would be pleasantly surprised if you can do this with the Affinity applications.

It’s the “while not colliding into each other” part which is the most difficult bit, meaning that the software will need to do geometrical calculations on each shape, taking the geometries of the surrounding shapes into consideration, and modify each shape accordingly.

This may be possible with a combination of functionalities, probably with rasterisation (not vector), but I’m fairly sure that it can’t be done without a lot of manual effort.

Link to comment
Share on other sites

@GarryP Well, it doesn't have to be calculated in such a caveman way. It could be an algorithm that calculates where the "seams" between these objects (or even just the centerpoints of the objects, they don't have to be seen as circles, just points) are and split a larger circle shape by these seams. I just don't know if such an algorithm exists or is possible to do in the program.

Link to comment
Share on other sites

I’m not quite sure what you mean by “caveman way” but, if I have understood your requirements correctly, lots of very specific complex vector calculations will need to be made and I don’t think the Affinity software can do what you want it to do. (I’d be happy to learn otherwise.)

There may be other software out there that will do it but I don’t know what you could search for to find it.

Link to comment
Share on other sites

Maybe this pattern?

Only bitmap, may use an tracing app to vectorize.

Recipe:

  1. add Gaussian blur, radius px size of circles as starting point
  2. add Gaussian blur, set blend mode to difference, 0.1px radius
  3.  Add levels adjustment, set white level to about 1%
  4. add threshold adjustment, adjust to taste

46B40A58-2C01-4A46-9C6F-99AEA70135A6.thumb.png.45bed1e7772ad997e19be30a3322ac2b.png

circle pattern.afphoto

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Honest question: how did you create the circle pattern? Can you share the .afphoto file?

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

  • Staff

Hi @Imonobor,
No, there's no way to do this in Affinity dinamically. Actually as far as I'm aware no 2d illustration vector software is able to do what you want. You have more chances to find this type of function on a 3d based software then on a vector based illustration app. You can however draw an hexagonal grid from scratch in Designer and eventually use a custom grid to help you snap the hexagons in place as you see fit.

Link to comment
Share on other sites

@NotMyFault Sorry, I need it to be this precise pattern. I did it mostly with geometry and maths - made a line of dots, spaced them evenly and started duplicating and rotating some of them, ended up with this. I've attached the file if you want it.

@MEB Thanks for the answer, I'll look into doing this kind of thing in blender. Is it possible to import the vertex "vectors" from planes in blender back to curves in Affinity Designer?

 

Also, the thing I'm trying to do is called Voronoi Diagram apparently - https://en.wikipedia.org/wiki/Voronoi_diagram

Circle.afdesign

Link to comment
Share on other sites

22 minutes ago, Imonobor said:

Also, the thing I'm trying to do is called Voronoi Diagram apparently

https://affinity.help/photo/English.lproj/pages/Filters/filter_voronoi.html

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

9 hours ago, Imonobor said:

Does anyone know what this "technique" is called so I can search it better or know a way to achieve it in Designer?

I think what you are after is a packing problem. My math/geometry skills have atrophied to the point of uselessness. The centre dot would be a hexagon because of the six surrounding dots. The six would be ... this is where I fail, there are ten dots outside ... so maybe pentagons for the six dots or 3 + 4 or 3 + 2? I just can't recall how to do this. 

Each larger radius would be composed of polygons which fit side by side for the circles and inner radius and outer radius number of sides would need to fit with the number of dots in those circles. I think it is easy once you understand the packing.

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

2 hours ago, Old Bruce said:

I think what you are after is a packing problem. My math/geometry skills have atrophied to the point of uselessness. The centre dot would be a hexagon because of the six surrounding dots. The six would be ... this is where I fail, there are ten dots outside ... so maybe pentagons for the six dots or 3 + 4 or 3 + 2? I just can't recall how to do this.

Why would you switch from hexagons to pentagons, instead of using hexagons throughout (like bees do for their honeycombs)? One hexagon is surrounded by a ring of six hexagons, a ring of six is surrounded by a ring of twelve, and so one on.

Edited by Alfred
Corrected typo.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

I found a couple of videos and scripts that generate real Voronoi patterns from points, but they are all for Adobe Illustrator. Guess I'll use that then.

@Old Bruce @Alfred The pattern I have is not "regular" at all - the points are placed seemingly randomly (athough I did follow certain mathematical calculations), so the end result won't have any regular hexagons or pentagons, besides the central one. I'll post it here once (and if I'm able to) I make it. But doing this manually is just not something a sane person would try to do.

Link to comment
Share on other sites

17 minutes ago, Alfred said:

Why would you switch from hexagons to pentagons, instead of using hexagons throughout (like bees do for their honeycombs)? One hexagon is surrounded by a ring of six hexagons, a ring of six is surrounded by a ring of twelve, and so one.

Because of the drawing in the first post, centre, then a ring of six then a ring of 10.

1361554131_ScreenShot2022-07-27at9_49_56AM.png.13551a23d95736c488603dc58d54f74c.png

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

26 minutes ago, Old Bruce said:

Because of the drawing in the first post, centre, then a ring of six then a ring of 10.

 

??? I see 12 of them!

image.png.e3dfed603b583fa99f04f379c92862a3.png

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

24 minutes ago, Pšenda said:

??? I see 12 of them!

Right. I was wrong. But we cannot have a series of dots in circles that match a Hexagonal grid. Distance across the flats versus across the points. This is tiling the plain  or packing problem.

396324338_ScreenShot2022-07-27at10_45_14AM.png.f760d59595d2280ade71fcd0c770f3d6.png

Mac Pro (Late 2013) Mac OS 12.7.4 
Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

14 hours ago, Imonobor said:

Does anyone know what this "technique" is called so I can search it better or know a way to achieve it in Designer?

I think it's called Circle Packing !

See related:

cpacking.gif.50dd56f06b4757b95c8eeb54e99f06ea.gif

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.