## Modelling a Straight Stroke

From a technical point of view, Digital Marbling is a modelling and simulation activity. The modelling is concerned with finding mathematical equations that describe the movement of the colours when a comb or rake is pulled through them. It is then the job of Simulation to develop algorithms that solve those equations and generate the output data that describes the marbled patterns.

To model the process of marbling exactly would involve the Navier-Stokes equations – a system of partial differential equations that are extremely difficult to solve. Fortunately, we can make several simplifying assumptions, so that the mathematical model we end up with is very simple. The drawback of the simplifications is that we are limited in the types of strokes we can simulate.

The model we end up with simply states that colours move in parallel with the tine, and the distance it moves decreases with distance from the tine. Therefore, colours that are very close to a tine are dragged along further, and colours that are further away move less far. Beyond a certain distance from the tine, the distance moved is less than one pixel,. so we can treat it as zero.

The following diagram shows the geometry we need to do in order to compute how a colour pixel moves.

We assume that a tine is making a stroke** S** in the direction defined by the two points

**and**

*B**. The unit vector parallel to*

**E****is**

*S***and the normal unit vector is**

*Sp***.**

*Sn*The pixel of colour we are interested in moving is at ** P**. It will move to

**in a direction that is parallel to**

*P’***. The distance it moves depends on**

*S**d*, the distance between points

**and**

*B**. The function*

**P***f (d)*takes

*d*as input and gives the distance

**as output. The function**

*P-P’**f*decreases exponentially with

*d*. It also depends on the viscosity of the fluid: the higher the viscosity, the further the influence of the tine extends in direction

*. This computation must be carried out for all pixels along the vector PB, in principle to infinity in both directions, but in practice only as far as the influence of the tine extends. There are many additional details that we don’t want to go into here.*

**Sn**This is the effect of a single, straight diagonal stroke:

# 2 Comments

### Submit a Comment

You must be logged in to post a comment.

Do you have code available for your implementation of digital marbling? I’m very interested in simulating the marbling process for teaching purposes and am trying to find out if there is existing software available to do so.

Alexa,

Unfortunately not. My marbling program is entirely hand-coded, and I am not aware of any publicly available marbling software.