# Procedural texture generator (example and wishes)

**URL:** <https://krita-artists.org/t/procedural-texture-generator-example-and-wishes/7638>\
**Category:** Artists Feedback & Testing\
**Created:** [May 27, 2020, 11:31am UTC](https://krita-artists.org/t/procedural-texture-generator-example-and-wishes/7638 "2020-05-27T11:31:06Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![wolthera](https://krita-artists.org/user_avatar/krita-artists.org/wolthera/32/236085_2.png) [@wolthera](https://krita-artists.org/u/wolthera)\
**Post date:** [June 21, 2020, 3:07pm UTC](https://krita-artists.org/t/procedural-texture-generator-example-and-wishes/7638/9 "2020-06-21T15:07:56Z")

</div>

Ok, managed to get a really nice one down:

```
$ratiov = $h/$w;
$uv = [$u, $v*$ratiov, 0];
$size = 15; # 0,30;
$outlines = 10; #1, 20;
$color1 = [0,0,0];
$color2 = [1,1,1];

$point = pvoronoi($size*$uv,4,0,.2);

#circle determining part

$dist = ($uv*$size)-$point;
$dotproduct = dot(dist, dist) * 4;

#filling the circles

$fac = fmod(sin($dotproduct*$outlines) , 1);
$color = ccurve($fac,0,$color1,4,1,$color2,4);

$color

```

This one is very similar to an old hand-drawn graphical pattern where you place a circle, and then another circle and you then draw circles around those. The problem with getting a computer to do this is that it’s a little hard to explain what exactly what you want, which makes things like having variation between circles while keeping the outline consistent a little hard.

 ![image](https://krita-artists.org/uploads/default/original/2X/2/2b48ff16d7f23ddf96515536d8d540df464a306a.jpeg)

EDIT: I updated it so the circles would be round…

---

_[View the full topic](https://krita-artists.org/t/procedural-texture-generator-example-and-wishes/7638)._
