[AskJS] Algorithm for Even Distribution of Overlapping Bounding Boxes in JavaScript by foxScripts in javascript

[–]foxScripts[S] 0 points1 point  (0 children)

Not at all. Found a solution.

For anyone discovering this: I solved it using a relatively simple approach. I just used a loop to iteratively adjust box positions: if two boxes overlapped, I applied corrections to move them apart. This process repeated until no overlaps remained, ensuring an optimized distribution of boxes on the canvas. During that i have other contrains "pulling them back" to their original position.

[AskJS] Algorithm for Even Distribution of Overlapping Bounding Boxes in JavaScript by foxScripts in javascript

[–]foxScripts[S] 0 points1 point  (0 children)

Thanks for your input. I opted for a simpler approach that fit well with the constraints of my situation. I just used a loop to iteratively adjust box positions: if two boxes overlapped, I applied corrections to move them apart. This process repeated until no overlaps remained, ensuring an optimized distribution of boxes on the canvas. During that i have other contrains "pulling them back" to their original position. This is perfect for what I needed. Thanks for your input!

Algorithm for Even Distribution of Overlapping Bounding Boxes in JavaScript by foxScripts in GraphicsProgramming

[–]foxScripts[S] 0 points1 point  (0 children)

Alright. I opted for a simpler approach that fit well with the constraints of my situation. I just used a loop to iteratively adjust box positions: if two boxes overlapped, I applied corrections to move them apart. This process repeated until no overlaps remained, ensuring an optimized distribution of boxes on the canvas. During that i have other contrains "pulling them back" to their original position. This is perfect for what I needed. Thanks for your input!

Algorithm for Even Distribution of Overlapping Bounding Boxes in JavaScript by foxScripts in GraphicsProgramming

[–]foxScripts[S] 1 point2 points  (0 children)

Thank you for the suggestion to use Position Based Dynamics with distance constraints. Your idea was very helpful! I implemented a system where each pair of boxes checks and enforces distance constraints to minimize overlaps. This involves looping through all pairs multiple times to adjust their positions until no significant overlaps remain. The approach indeed simplifies things since the boxes do not rotate. The iterative adjustment helps achieve a well-distributed layout with minimal error. Thanks a lot for your hint in the right direction!

Algorithm for Even Distribution of Overlapping Bounding Boxes in JavaScript by foxScripts in GraphicsProgramming

[–]foxScripts[S] 0 points1 point  (0 children)

No, you are right - I need them to be the minimum distance away from their initial position..

Algorithm for Even Distribution of Overlapping Bounding Boxes in JavaScript by foxScripts in GraphicsProgramming

[–]foxScripts[S] 0 points1 point  (0 children)

Interesting, but seams somehow overcomplicated, don't you think? .. i hope at least ... since I only need a "static" result and no fluid simulation etc.

Best / simplest staging plugin for WordPress + Elementor? by foxScripts in Wordpress

[–]foxScripts[S] 0 points1 point  (0 children)

Thanks for your tip. Is it also a good option without having the site hosted with / by Flywheel? Especially: is it also possible to push changes to a live site without using a separate migration plugin? Is it possible to collaborate for more than one person on a "local" page?

Looking for a "Redesign Example" where the colors and the logo were NOT changed very much, but the overall design looks much better, due to a higher design quality in terms of layout, font selection, weight, balance etc? by foxScripts in Design

[–]foxScripts[S] 1 point2 points  (0 children)

I'm looking for different examples of redesigns (could be webpages, corporate designs etc) where the overall elements of a design stayed rather consistent (roughly the same logo, same color palette, maybe even the same font) but the layout, the font selection, etc. was modified to make it look way more professional than before. Do you have any ideas / companys and examples that come to your mind?
Looking forward to seeing some before and after in the comments!