HomeJournalThis post

Ferrofluid Field-Line Art, Honest Physics

A disclosed dipole-field and RK4 streamline study creates ferrofluid-inspired poster geometry without claiming fluid simulation, with spacing and SVG receipts.

JP
JP Casabianca
UI/UX designer and full-stack engineer · Bogotá

Ferrofluid field-line art can borrow magnetic geometry without pretending to simulate a fluid. A two-dimensional dipole field does not contain surface tension, viscosity, particles, gravity, or the moving boundary that produces real ferrofluid behavior.

This tutorial treats that limitation as part of the art direction. It integrates deterministic RK4 streamlines, measures spacing and termination, and composes a poster whose claims match exactly what the code computes.

Ferrofluid-inspired dipole field arrangementTwo idealized dipoles create curved streamlines and a central saddle, with magnet singularities explicitly guarded. dipole Adipole Bsaddle
Figure 1: The renderer computes vector-field streamlines; it does not compute a fluid surface or Rosensweig peaks.

Name ferrofluid field-line art honestly

Ferrofluid field-line art can borrow the directional geometry of a magnetic vector field, but a streamline poster is not a simulation of ferrohydrodynamics. This tutorial integrates a simplified dipole field, verifies its paths, and composes a high-contrast edition. The missing surface tension, gravity, viscosity, particles, and evolving free surface stay visible as limitations, not buried in a footnote.

A dipole field supplies directional geometry, not a ferrohydrodynamic simulation. Real ferrofluid pattern formation involves magnetic forces, surface tension, gravity, viscosity, particle behavior, and boundary conditions absent from this poster code. I put that limitation in the opening and figure caption because epistemic honesty changes how viewers read the image.

Compose a magnetic vector field.

Each idealized dipole contributes a vector from declared position and moment, and contributions sum before normalization. The magnet arrangement diagram marks singularity guards and field saddles alongside the intended focal corridor. A mirrored control checks symmetry, while the final arrangement can break it deliberately. Parameters are compositional choices inside a mathematical model, not measured properties of a specific fluid.

The magnet arrangement is a compositional instrument: positions, moments, and signs establish saddles, corridors, and dense focal regions. A symmetry control uses mirrored dipoles and verifies mirrored field samples before any seed jitter is applied. This gives the edition a reproducible skeleton while allowing deliberate asymmetry in the final crop.

Integrate streamlines with RK4

Fourth-order Runge–Kutta follows field direction with lower step error than a coarse Euler trace. The comparison uses the same seed near a curved region and refines until endpoints stabilize within tolerance. Every path records why it stopped: boundary, singularity, weak field, loop, length, or spacing collision. Smooth output is accepted only after the underlying samples pass.

Streamlines integrate the normalized vector field with fourth-order Runge–Kutta steps. They terminate at a singularity guard, weak-field threshold, domain edge, loop detector, maximum length, or collision with an existing line. Recording the termination reason prevents missing strokes from being mistaken for a stylistic choice when the integrator actually failed.

Runnable artifact: The simplified dipole fixture rejects singularities and keeps normalized integration finite and bounded.

Save this proof as dipole-streamlines.test.mjs and run node dipole-streamlines.test.mjs. Expected final line: PASS: bounded field-line integration.

import assert from "node:assert/strict";
const field=(x,y)=>{const r2=x*x+y*y;if(r2<1e-6)return null;const r=Math.sqrt(r2),dot=x/r;return [(3*x*dot/r-y*0)/r**3-1/r**3,3*y*dot/r**4]};const step=(p,h=.01)=>{const k=field(...p);if(!k)return null;const n=Math.hypot(...k);return [p[0]+h*k[0]/n,p[1]+h*k[1]/n]};let p=[1,.5];for(let i=0;i<100;i++){p=step(p);assert.ok(p&&p.every(Number.isFinite))}assert.equal(field(0,0),null);assert.ok(Math.hypot(...p)<10);console.log("PASS: bounded field-line integration");
PropertyThis rendererReal ferrofluidClaim
MagnetismIdeal dipolesMeasured fieldInspired geometry
MotionStreamlineFluid dynamicsNot simulated
SurfaceNoneTension + gravityNot predicted
OutputSVG pathsMaterial observationPoster study
Figure 2: Computed geometry and absent material physics remain separate throughout the edition.

Separate geometry from Rosensweig physics.

A Rosensweig instability growth study and a direct ferrofluid observation demonstrate richer material behavior than this renderer contains. The semantic panel labels what the code computes and what real physics would require. That boundary is the thesis, not a disclaimer attached after a fake-physics claim.

Euler and RK4 traces are compared at coarse and refined step sizes around one curved region. The accepted step is the largest one whose endpoint and local direction remain within tolerance of the refined reference. That test spends computation where curvature demands it and avoids advertising smooth Bézier output over inaccurate physical-space integration.

Control density in final output units

Seed candidates are evaluated against existing paths through a spatial index, and minimum gaps are measured at print scale. Density rises around one focal corridor while negative space remains structurally important. Flow-field plotter art contributes spacing and material-proof methods, and Physarum networks offers a different agent-based growth metaphor.

Rosensweig-pattern research and direct ferrofluid observations explain why actual materials can form peaks and dynamic structures, but they do not validate this two-dimensional streamline image. I use those sources to sharpen the boundary, not to borrow laboratory authority. The poster is ferrofluid-inspired magnetic field-line art with a disclosed mathematical model.

Work one seed through every termination rule. A seed begins outside the left dipole guard and advances through normalized RK4 stages until it reaches the domain edge after 143 accepted samples. A neighboring seed curves toward the singularity disk and stops with guard, while a third revisits a quantized spatial cell with matching direction and stops as a loop. Ferrofluid field-line art retains these reasons in path metadata, making absence and length part of the evidence rather than invisible renderer behavior.

The line simplifier runs only after integration and must stay within a final-scale deviation tolerance. It cannot bridge across a termination, enter a magnet disk, or reduce spacing below the print gate. The SVG caption can therefore state exactly what is preserved: sampled magnetic direction under a simplified dipole model. It never upgrades a smooth vector path into a statement about a liquid surface.

Turn field lines into a poster hierarchy

The final composition uses a dense black current, a paper basin, and a restrained mineral accent at selected termination points. It avoids glossy texture and spike imagery the model never produced. Chladni pattern art shows another path from physical inspiration to labeled computational study, while topographic contours show hierarchy through line weight.

Seed spacing is evaluated in final output units, and a spatial index rejects candidates too close to accepted paths. Density rises near the intended focal corridor but never beyond the print's minimum gap. A grayscale proof checks hierarchy independently of hue, while a singularity overlay remains available in the technical contact sheet.

Build an edition from density counterpoint. Ferrofluid field-line art becomes visually specific when computed direction serves an editorial hierarchy. I use one tight bundle to establish weight, a sparse basin to hold title and silence, and a secondary current that returns the eye without closing a decorative frame. Line weight follows path role and output scale, not local field magnitude, because physical magnetic strength is not being encoded as measured data.

The contact sheet compares magnet arrangement, seed distribution, integrator tolerance, crop, and palette in separate rows so causality remains legible. Physical proofs check minimum gaps and dense crossings. Ferrofluid field-line art can then be judged as a graphic system—rhythm, balance, emphasis, and restraint—while the attached model boundary prevents aesthetic success from laundering a simplified field into fake scientific authority.

  1. 1Arrange

    Place dipoles

  2. 2Integrate

    RK4 field path

  3. 3Cull

    Guard + space

  4. 4Compose

    Direct hierarchy

Figure 3: Every visible line carries a termination and spacing receipt.

Test singularities, spacing, and SVG paths

The artifact checks finite samples, singularity rejection, bounded integration, and deterministic output; the production version adds RK4 convergence, mirrored controls, path separation, and combined hashes. Vector export follows the SVG Paths standard. A technical contact sheet retains magnet disks and termination marks even when the exhibition print removes them.

The SVG test verifies finite coordinates, domain bounds, path separation samples, mirror behavior in the control, unique IDs, and a deterministic combined hash. It also asserts no segment crosses the excluded magnet disks. Those receipts make the visually fluid lines accountable to the exact field and integrator described in the article.

Invite scientific critique without changing the claim. A reviewer with magnetism or fluid expertise should be able to identify the exact equation, idealizations, normalization, and omitted terms from the published receipt. Ferrofluid field-line art welcomes that critique because the project does not depend on passing as simulation. If a later edition introduces measured fields or a fluid solver, it receives a new model name and validation plan rather than retroactively upgrading earlier posters. Clear lineage lets creative computation become more sophisticated while preserving the honesty of every work already released.

Publish the model beside the artwork

Ferrofluid field-line art earns its name by making inspiration and computation equally legible. The archive includes dipoles, domain, integrator, step tolerance, seed set, termination counts, spacing, crop, palette, renderer version, and SVG hash. Anyone can reproduce the geometry, while nobody is asked to confuse it with laboratory evidence about an actual fluid.

Rosensweig patterns belong to the physical material literature, whereas generative field lines describe the bounded graphic procedure used here. Keeping those labels separate prevents an evocative composition from inheriting scientific claims that its simplified equation never tested.

My final composition keeps one dense black current against a large paper-colored basin, then uses a restrained mineral accent only at termination points. It is not a fake photograph and does not borrow the material's glossy black texture. The visual language comes from vector direction, accumulation, and pause—properties the model genuinely computes.

Ferrofluid field-line art can be technically honest and visually intense at the same time. Publish ferrofluid field-line art with the simplified dipole model, missing material physics, integration receipt, and final path hash attached.