Halftone like point pattern, geometrical problem

unhandled
(Beka Elikashvili) #1

Hello all,

im trying to create a dot structure between two curves (like the halftone function in Adobe Illustrator). The problem is that both curves have different shapes. Espessialy in the radius/corner areas. The goal is to have a nice flowing stucture along the two curves. The outer and inner dots should have approximately the same distance and radius. I tried it in two ways but still did not get a good result (GH file attached). You can see them by switching the seam filter at the end of the definition. I know that there must be inperfections between the first and last dot rows because of the two different shapes of curves. I just try to get the smoothest and nicest result possible. Maybe you have some ideas or tips.

I was thinking about to divide curves maybe with an graphmapper… so i can control the amount of division points in certain positions t of the curve. Is there a way to do so?

Thank you!
point_pattern_GH.gh (25.5 KB)

(Amir Touhidi) #2

Had to rebuild your curves so Evaluate Curve works. Just as a starting point.

point_pattern_GH_re.gh (26.9 KB)

(Beka Elikashvili) #3

Hey Amir,

thank you for your reply. Your definition is interesting but it does not solve the problem. If you connect the points with lines, you will end up with non perpendicular lines to the guide curves (picture attached). Furthermore i do not want to rebuild/interpolate the curves.

(Adam Mounsey) #4

Maybe this could work for you.

point_pattern_GH_Rev2.gh (16.3 KB)

(Laurent Delrieu) #5

Is something like that acceptable for you ?



It uses circle packing and Kangaroo. As it deals with circle it is very hard to not have fractures somewhere.
But you could apply some Loyd relaxation to limit artefacts.

(Beka Elikashvili) #6

Thank you for your reply guys!
@ Adam: an interesting solution but as you can see it still has imperfections (and will always have because theoretically there is no proper solution for that problem I guess… due to the extremely different radius of both curves).
@ Laurent: your results look amazing! Especially the first one. You are right… it is hard to control with circles. It will be acceptable with a little fine tune. Can you post the definition please so I can learn and take a look at how to improve your fantastic results.

Thank you, guys!

(Laurent Delrieu) #7

Hello
here is the definition, it is not very easy to use this circle packing as it is interactive. There are many links
https://www.grasshopper3d.com/m/discussion?id=2985220%3ATopic%3A1834244




Two first thing is to set a range of radius (the same for you) and a number of points.
image
The idea is not to put too big circle/sphere at the begining there must be room for the growth so the multiplier MUST be at a low level 0.1 0.2 … Then increase the slider. Don’t forget to set to true the toggle.
image
You will see circles growing. When you are happy set toggle to false
I also put a Lloyd relaxation. Here also you have to try. It could be optimized, not moving exterior points for example …
There are many parameters. To see Lloyd look here, it is a bit like you problem, but not following curves.



I put a mesh sphere in order to have black dots. I have some problems with Dots

point_pattern_GH_LD.gh (468.7 KB)
(Beka Elikashvili) #8

Hey Laurent

thank you for sharing your definition! I was playing around with it the last days. I end up with some interesting results. However the flow is still a little bit wobbly… to optimize it I was thinking about to extract the points which are created by the first part of the definition and organize them row by row oriented by the u/v Parameters of the reference surface and then to pull/project them to my curves in the previous definition. Maybe I will achieve better results… what do you think?

I will also try to optimize the Lloyd relaxation as you advised. The exterior points should stay on their places as you said. Sometimes i generate better results without Lloyd…

It seems to be a more difficult problem than i tought :slight_smile:

I appreciate your help!

#9

hmm. an idea occurred to me perhaps, if you limit the Lloyds relaxation to an area of a conical section, with center of the conical area at the center of your radius. This will shift the visual center of the ‘merge’ transition areas, where there already is a perceived optical effect, and make them less obvious. just a thought

(Laurent Delrieu) #10

It is quite hard to help you more, the problem is to have some visual quality and this is subjective.
Keeping points aligned with exterior curves is also one big constrain.

(Daniel Piker) #11

I agree this sounds like a set of constraints that are impossible to satisfy all simultaneously.
As the outer curve is longer than the inner one, and with different curvature, you won’t be able to keep the spacing even, while also keeping the circles on the row curves.
Another approach that might help though with finding an acceptable compromise between these aims is to create a quad grid between the curves, and relax that, then use it to place the circles:



point_pattern_relax.gh (22.9 KB)
With this you can adjust the sliders for relative strengths of each goal - such as how evenly distributed they stay on the outer curve.