|

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

  • | | |

    Orphic

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

  • | |

    3D Cubes x Orphic Overlay — Creative Coding in p5.js

    This post covers a creative coding study in p5.js, where I combine two visual languages in one frame: a strict 3D structure of nested wireframe cubes and a flat 2D layer inspired by Sonia Delaunay and Orphism. I designed the result specifically for VJ projection and ambient music performance. Two Systems in One Image I…

  • What Are Generative Visuals and Why Are They Everywhere Right Now?

    If you have ever watched a stage backdrop that seemed to breathe with the music, or wandered through an exhibition where the walls changed as people moved, you have met generative visuals. These are not hand animated frame by frame. They are built as systems. You design rules, add a few controls, connect them to…

  • | | |

    Orphic

    Orphic Orphic は、厳密な正方形の構図の中に集められた、九つのイメージの場として展開します。その枠の中には、私たちの時代を示す場面が現れます。絶えず移動する人々、戦争、墓地、汚染された空気、崩れゆく氷冠、Covid期の公共空間の空虚さ、そしてごみ捨て場。それぞれのイメージは独立して存在していますが、どれも孤立したまま無垢ではいられません。ともにそれらは、不安、喪失、人間の切迫感の星座を形づくります。まるで世界がここで語られているのではなく、断片として露わにされているかのように。 中央には、型を取ることを意図して制作した私自身の彫刻的な形が置かれています。しかし、それを固定し保存しようとするまさにその過程で、像は再び部分的に傷つきました。背面、とりわけ頭部の周辺では、かつて粘土を支えていた針金や小さなブロックが再び見えるようになりました。隠されているはずだったものが表面へ戻ってくる。かつて支えとして機能していたものが、今では傷跡として現れる。このことが、この像に特別な存在感を与えています。完成された物体としてではなく、自らの脆さを内側に抱えたものとして。 私にとって、この作品の核心はそこにあります。人間は形、秩序、進歩、そして制御を求めます。しかし同じその身振りの中で、至るところに亀裂の痕跡を残していきます。私たちを取り巻く世界は、その痕跡を帯びています。戦争と廃棄物の中に、生態系の衰退の中に、空虚さの中に、そして常に動き続けながらも本当にはどこにも到達しないような生き方の中に。中央の像は、その状態に対する答えを差し出すのではなく、その反響を示しています。身体、より正確には頭部は、ここでは築き上げると同時に不安定にする文明の担い手として現れます。 Orphicは、このように人間の条件についての省察となります。物事の表面が引き裂かれたときに何が見えるのか。作ることと傷つけること、保存することと失うこと、存在と崩壊のあいだにある脆い境界について。この作品は説明しようとはしません。その代わりに、私たちが普段覆い隠そうとするものへ視線を留めます。私たちの行為の痕跡、私たちの時代の残骸、そして最後に人間性が自らの何を残していくのかという問いへ。 SPOTIFY BANDCAMP ORPHIC by FDR-SOUND

  • | | |

    Orphic

    Orphic Orphic ontvouwt zich als een veld van negen beelden, samengebracht binnen een strikte vierkante compositie. Binnen dat kader verschijnen scènes die onze tijd markeren: mensen in voortdurende beweging, oorlog, een begraafplaats, vervuilde lucht, afbrokkelende ijskappen, de leegte van de publieke ruimte tijdens de Covid-periode, en een vuilnisbelt. Elk beeld staat op zichzelf, maar geen…

  • 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…

Leave a Reply

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