|

Creative Coding p5.js — Floating Cloth Physics Simulation

Floating Cloth in Space — Physics Simulation in p5.js

In this creative coding study I explore a simple but fascinating idea: what if a piece of fabric could exist without weight, drifting in space, but still behave like cloth. I built this sketch in p5.js WEBGL as a physics simulation designed for VJ projection and ambient looping.


The Physics System

I built the cloth from a grid of points connected by constraints. First, each point responds to its neighbours, so the surface can bend and ripple while staying fabric-like. In addition, I gave the system a memory of its original position, so the reset feels intentional rather than random.

The motion runs as a loop. The cloth slowly pulls itself into a wrap, then gradually eases back to its exact starting shape, and the cycle begins again. Because of this, the animation works perfectly for long projection — it never cuts, never jumps, and never draws attention to its own repetition.


Color and Texture

I chose the colors inspired by the clothing of the LGBTQ+ community — a moving rainbow that carries meaning beyond decoration. Furthermore, I made the color move continuously across the cloth, blending smoothly from one hue to the next, so the whole sheet feels alive rather than flashing between colors.

The surface itself is not a solid fill. Instead, I drove the transparency with noise, which gives the cloth an airy, shifting texture. As a result, light seems to pass through the fabric, making it feel genuinely weightless.


Why It Works for Projection

I designed this sketch to stay in frame at 1920×1080, with a fixed camera and gentle boundaries so it never drifts out of view. Therefore it is calm enough to live in the background of a performance, but detailed enough to keep pulling you in if you watch it closely.

This is the same approach I use in my 3D Cubes x Orphic Overlay study — slow, layered visuals that breathe alongside ambient music rather than competing with it.


Technical Notes — p5.js WEBGL

I built the simulation in p5.js in WEBGL mode at 1920×1080. The cloth is a grid of points with spring constraints between them. I drove the color with HSB cycling and the transparency with Perlin noise. Finally, I added a reset system that eases every point back to its origin position, making the loop seamless.

For more creative coding work, visit the Creative Coding overview or explore the FDR-Sound music page.

Similar Posts

  • Affordable Creative Software for Abstract Visuals

    Abstract and generative visuals are gaining popularity in art, design, VJ performances, and interactive installations. Fortunately, you don’t need to spend a fortune to access powerful tools. This guide explores the best affordable or free software to create your own abstract visuals—including support for live performances, interactive projects, and graphic experimentation. In this article, we…

  • | | |

    Orphic

    Orphic Orphic entfaltet sich als ein Feld aus neun Bildern, zusammengeführt innerhalb einer strengen quadratischen Komposition. Innerhalb dieses Rahmens erscheinen Szenen, die unsere Zeit markieren: Menschen in ständiger Bewegung, Krieg, ein Friedhof, verschmutzte Luft, schmelzende Eiskappen, die Leere des öffentlichen Raums während der Covid-Zeit und eine Müllhalde. Jedes Bild steht für sich, doch keines bleibt…

  • | | |

    Orphic

    Orphic Orphic unfolds as a field of nine images, brought together within a strict square composition. Inside that frame appear scenes that mark our time: people in constant transit, war, a cemetery, polluted air, crumbling ice caps, the emptiness of public space during the Covid period, and a rubbish dump. Each image stands on its…

  • | | |

    Orphic

    Orphic Orphic 以九幅图像的场域展开,并被置于一个严格的正方形构图之中。在这个框架内,出现的是标记我们时代的场景:不断迁移中的人群、战争、墓地、被污染的空气、崩塌的冰盖、Covid 时期公共空间的空寂,以及垃圾堆。每一幅图像都独立存在,但没有任何一幅能在孤立中保持无辜。它们共同构成了一组关于不安、失去与人类紧迫感的星群,仿佛这里并不是在叙述世界,而是在碎片中揭示世界。 中心位置立着我自己的雕塑形体,它最初是为了制作模具而塑造的。然而,正是在这个固定与保存的过程中,这个形体又一次被部分损伤。在背面,尤其是头部周围,曾经用来支撑黏土的铁丝和小木块再次显露出来。本应隐藏的东西重新回到表面。曾经作为支撑的东西,如今显现为伤痕。这赋予了这个形体一种特殊的存在感:它不是一个完成的物件,而是某种将自身脆弱性承载于内部的存在。 对我而言,作品的核心正存在于此。人类追求形态、秩序、进步与控制,然而在同一个动作中,又到处留下破裂的痕迹。我们周围的世界承载着这些印记:在战争与废弃物中,在生态衰退中,在空寂中,也在一种似乎永远移动却从未真正抵达的生活方式中。中心的形体并不为这种状态提供答案,而更像是它的回声。身体,或者更准确地说,头部,在这里作为一种文明的承载者出现,这种文明一边建造,一边又使自身动荡不安。 Orphic 因而成为一场关于人类处境的反思。关于当事物的表面被撕开时,究竟有什么会变得可见。关于创造与损伤之间、保存与失去之间、存在与衰败之间那条脆弱的边界。作品并不试图解释。相反,它让目光停留在我们通常试图遮盖的东西上:我们行动的痕迹、我们时代的残余,以及最终人类究竟会留下什么关于自身的问题。 SPOTIFY BANDCAMP ORPHIC by FDR-SOUND

  • | | |

    Orphic

    Orphic Orphic si sviluppa come un campo di nove immagini, riunite all’interno di una rigorosa composizione quadrata. Dentro quella cornice appaiono scene che segnano il nostro tempo: persone in continuo transito, guerra, un cimitero, aria inquinata, calotte glaciali che si sgretolano, il vuoto dello spazio pubblico durante il periodo del Covid, e una discarica. Ogni…

  • | | |

    Orphic

    Orphic Orphic se despliega como un campo de nueve imágenes, reunidas dentro de una estricta composición cuadrada. Dentro de ese marco aparecen escenas que marcan nuestro tiempo: personas en tránsito constante, la guerra, un cementerio, aire contaminado, casquetes polares que se desmoronan, el vacío del espacio público durante el período de Covid y un vertedero…

Leave a Reply

Your email address will not be published. Required fields are marked *