Leaks: causes and answers

In Arabeske, a leak happens when two or more texture are applied to the same closed area. It can be the result of a mere careless mistake, when a given area actually contains several textures, but most of the times the cause is an insufficient border closure. It can often happen that a pattern which seems closed is actually open, while at first glance the pattern seems sane.

To help the user understand and fix these problems, Arabeske reports by default, when a pair of texture fill the same area, which textures are concerned, and also tells which are the closest non-intersecting links. This help can be very useful, but determining the pair of links can take a while (section 7/10 in the texturing process). For this reason, it can be optionally disabled from the user settings menu.

There are two frequent ways to introduce leaks in patterns: using rectangular coordinates in p3* or p6* groups, and clumsy sharp angles handling in interlaced patterns.

Rectangular coordinates

Let's take a simple example: a plain triangle, drawn inside a 300 radius circle. Using polar coordinates, this is quite straightforward: in an empty p3 pattern, draw a primary node of radius 300, then a polar link from this node to itself, from angle 0 to angle 10°. A simple texture to check the result, and here we go:

Now, let's try it in rectangular coordinates. In an empty p3 pattern, draw a rectangular link from (300, 0) to? well, err? Let's fire the calculator and make all those mundane calculations Arabeske makes for free in polar coordinates. The end coordinates are (300*cos(120°), 300*sin(120°)), which makes (-150, 259.807). No problem: let's just round this to (-150, 260), which is what Arabeske will do for you if you use the default 10 units grid size. Now add a texture, get into final mode and? let's see how the texture gently floods the whole pattern.

What happened? Internally, Arabeske handles everything in floating point values, using the best precision available. In polar coordinates, the real coordinates of the links are used, without other rounding and errors than the small ones introduced by double precision calculations, which is much better than the 1/1000 precision available to the user in rectangular coordinates. As a result, Arabeske detects the 0.183 user units difference introduced when rounding, and considers that the links do not intersect. It is possible to cheat and manually change the values to get a small intersection: change 260 into 259 will fix the leak. However, in interlaced mode, the result is not exactly appealing:

The only clean solution to design p3* and p6* textured patterns is using polar links.

However, in p4* groups, rotations do not introduce rounding issues, so rectangular coordinates are correct. They can also be used if interlacing is not needing, provided that the pattern has clear, even small, intersections.

Interlaced patterns with sharp angles

Let's imagine that, during one of your frequent overseas journeys, you spotted the following pattern, which you immediately drafted onto a paper you had at hand.

Motif carrelage Wacom

Going back home, you rush to your computer, fire Arabeske, and 15 to 20 seconds later you create this pattern, using two rectangular links and five textures:

Objets motif carrelage
 
Brouillon motif carrelage

The result in final mode is brilliant, but the interlaced mode render is much less likely to make it into your gallery:

Motif carrelage final Motif carrelage entrelacé

The interlaced mode works well, only if pairs of lines cross each other, not three or more. In this case, 3 lines meet at the same point, and as Arabeske has no crystal ball t find out how to follow the lines, the result is poor. No problem: if the inner square is a bit too wide, let's shrink it so that the nice thick lines look great. And of course, here comes a texture leak.

Avoiding this kind of problems is not straightforward. Either the inner square is too small, which makes the pattern leak, or the pattern is closed, and the sharp ugly angles get outside the expected border. The answer is not simple, and this might be the reason why you are quite unlikely to see this pattern in real life.

Let's face it: to have a closed pattern, the inner and outer square must intersect. To get a clean angle, either both squares must be remote, or? angles must be properly cut. Here lies the answer: cutting the outer square border, and making adjacent sides of the inner square cross each other before reaching the outer square, with a bit of tuning, we can get the following result, which combines every suitable features:

Motif carrelage corrigé