diff --git a/art/drawhearts/index.html b/art/drawhearts/index.html index ead533ec..f7700009 100644 --- a/art/drawhearts/index.html +++ b/art/drawhearts/index.html @@ -1,9 +1,69 @@ -Step to the 💗 beat - lavafroth= 1.0) { + gl_FragColor = vec4(deep_pink, 1.0); + return; + } + vec3 color = mix(deep_pink, light_pink, r_disc); + gl_FragColor = vec4(color,1.0); +} I tinkered around for quite a while before discovering that I can intersect two xyxy skewed ellipses -with the absolute value operator. Here’s my custom equation for the heart shape. -x2+y2−∣x∣y=r x^2 + y^2 - |x|y = r have fun!'>

Jan 18, 2026

Step to the 💗 beat

My first procedurally generated animation drawing concentric heart -growing from the center of the screen. The source code for the -program used to create this piece is available on my GitHub.

I tinkered around for quite a while before discovering that I can intersect two xyxy skewed ellipses +with the absolute value operator. Here’s my custom equation for the heart shape.'>

Jan 18, 2026

Step to the 💗 beat

My first procedurally generated animation using shaders.

The shader can be visualized with glslViewer.

uniform vec2 u_mouse;
+uniform vec2 u_resolution;
+uniform float u_time;
+
+void main (void) {
+    vec2 st = gl_FragCoord.xy/u_resolution.xy;
+   float aspect = u_resolution.x/u_resolution.y;
+    st.x *= aspect;
+
+    // positioning shenanigans
+    st.x = st.x * 2.0 - 1.8;
+    st.y = st.y * 2.0 - 0.9;
+
+    float r = st.x*st.x + st.y*st.y - abs(st.x)*st.y;
+    r *= 2.0;
+
+    float duration = 3.0;
+    float bin = 0.1;
+    float scaled_time = fract(u_time/duration);
+    float loop = scaled_time * 2.0 - 1.0;
+    float r_disc = floor((r + loop*loop)/bin) * bin;
+
+    vec3 deep_pink = vec3(0.917, 0.235, 0.478);
+    vec3 light_pink = vec3(0.976, 0.780, 0.803);
+
+    if (r_disc >= 1.0) {
+        gl_FragColor = vec4(deep_pink, 1.0);
+        return;
+    }
+    vec3 color = mix(deep_pink, light_pink, r_disc);
+    gl_FragColor = vec4(color,1.0);
+}
+

I tinkered around for quite a while before discovering that I can intersect two xyxy skewed ellipses with the absolute value operator. Here’s my custom equation for the heart shape.

x2+y2−∣x∣y=r x^2 + y^2 - |x|y = r

have fun!

\ No newline at end of file diff --git a/art/index.xml b/art/index.xml index fd3bb297..b2d7ecbf 100644 --- a/art/index.xml +++ b/art/index.xml @@ -1,9 +1,39 @@ -Art on lavafrothhttps://lavafroth.is-a.dev/art/Recent content in Art on lavafrothHugoen-usSun, 18 Jan 2026 08:06:06 +0530Step to the 💗 beathttps://lavafroth.is-a.dev/art/drawhearts/Sun, 18 Jan 2026 08:06:06 +0530https://lavafroth.is-a.dev/art/drawhearts/<p>My first procedurally generated animation drawing concentric heart -growing from the center of the screen. The source code for the -program used to create this piece is <a href="https://github.com/lavafroth/drawhearts">available on my GitHub</a>.</p> -<p>I tinkered around for quite a while before discovering that I can intersect two <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mi>y</mi></mrow><annotation encoding="application/x-tex">xy</annotation></semantics></math></span> skewed ellipses -with the absolute value operator. Here&rsquo;s my custom equation for the heart shape.</p> -<span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><msup><mi>y</mi><mn>2</mn></msup><mo>−</mo><mi mathvariant="normal">∣</mi><mi>x</mi><mi mathvariant="normal">∣</mi><mi>y</mi><mo>=</mo><mi>r</mi></mrow><annotation encoding="application/x-tex"> x^2 + y^2 - |x|y = r </annotation></semantics></math></span><p>have fun!</p>✨https://lavafroth.is-a.dev/art/sparkles/Tue, 15 Jul 2025 11:52:20 +0530https://lavafroth.is-a.dev/art/sparkles/Amateur Blender Sculpturehttps://lavafroth.is-a.dev/art/amateur-blender-sculpture/Sat, 03 Aug 2024 17:50:00 +0530https://lavafroth.is-a.dev/art/amateur-blender-sculpture/<p>This is my first time trying out sculpting in blender, so forgive me for the +Art on lavafrothhttps://lavafroth.is-a.dev/art/Recent content in Art on lavafrothHugoen-usSun, 18 Jan 2026 08:06:06 +0530Step to the 💗 beathttps://lavafroth.is-a.dev/art/drawhearts/Sun, 18 Jan 2026 08:06:06 +0530https://lavafroth.is-a.dev/art/drawhearts/<p>My first procedurally generated animation using shaders.</p> +<p>The shader can be visualized with <code>glslViewer</code>.</p> +<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-glsl" data-lang="glsl"><span style="display:flex;"><span><span style="color:#66d9ef">uniform</span> <span style="color:#66d9ef">vec2</span> u_mouse; +</span></span><span style="display:flex;"><span><span style="color:#66d9ef">uniform</span> <span style="color:#66d9ef">vec2</span> u_resolution; +</span></span><span style="display:flex;"><span><span style="color:#66d9ef">uniform</span> <span style="color:#66d9ef">float</span> u_time; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span><span style="color:#66d9ef">void</span> main (<span style="color:#66d9ef">void</span>) { +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec2</span> st <span style="color:#f92672">=</span> gl_FragCoord.xy<span style="color:#f92672">/</span>u_resolution.xy; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> aspect <span style="color:#f92672">=</span> u_resolution.x<span style="color:#f92672">/</span>u_resolution.y; +</span></span><span style="display:flex;"><span> st.x <span style="color:#f92672">*=</span> aspect; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#75715e">// positioning shenanigans</span> +</span></span><span style="display:flex;"><span> st.x <span style="color:#f92672">=</span> st.x <span style="color:#f92672">*</span> <span style="color:#ae81ff">2.0</span> <span style="color:#f92672">-</span> <span style="color:#ae81ff">1.8</span>; +</span></span><span style="display:flex;"><span> st.y <span style="color:#f92672">=</span> st.y <span style="color:#f92672">*</span> <span style="color:#ae81ff">2.0</span> <span style="color:#f92672">-</span> <span style="color:#ae81ff">0.9</span>; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> r <span style="color:#f92672">=</span> st.x<span style="color:#f92672">*</span>st.x <span style="color:#f92672">+</span> st.y<span style="color:#f92672">*</span>st.y <span style="color:#f92672">-</span> abs(st.x)<span style="color:#f92672">*</span>st.y; +</span></span><span style="display:flex;"><span> r <span style="color:#f92672">*=</span> <span style="color:#ae81ff">2.0</span>; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> duration <span style="color:#f92672">=</span> <span style="color:#ae81ff">3.0</span>; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> bin <span style="color:#f92672">=</span> <span style="color:#ae81ff">0.1</span>; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> scaled_time <span style="color:#f92672">=</span> fract(u_time<span style="color:#f92672">/</span>duration); +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> loop <span style="color:#f92672">=</span> scaled_time <span style="color:#f92672">*</span> <span style="color:#ae81ff">2.0</span> <span style="color:#f92672">-</span> <span style="color:#ae81ff">1.0</span>; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> r_disc <span style="color:#f92672">=</span> floor((r <span style="color:#f92672">+</span> loop<span style="color:#f92672">*</span>loop)<span style="color:#f92672">/</span>bin) <span style="color:#f92672">*</span> bin; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec3</span> deep_pink <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec3</span>(<span style="color:#ae81ff">0.917</span>, <span style="color:#ae81ff">0.235</span>, <span style="color:#ae81ff">0.478</span>); +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec3</span> light_pink <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec3</span>(<span style="color:#ae81ff">0.976</span>, <span style="color:#ae81ff">0.780</span>, <span style="color:#ae81ff">0.803</span>); +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">if</span> (r_disc <span style="color:#f92672">&gt;=</span> <span style="color:#ae81ff">1.0</span>) { +</span></span><span style="display:flex;"><span> gl_FragColor <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec4</span>(deep_pink, <span style="color:#ae81ff">1.0</span>); +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span>; +</span></span><span style="display:flex;"><span> } +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec3</span> color <span style="color:#f92672">=</span> mix(deep_pink, light_pink, r_disc); +</span></span><span style="display:flex;"><span> gl_FragColor <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec4</span>(color,<span style="color:#ae81ff">1.0</span>); +</span></span><span style="display:flex;"><span>} +</span></span></code></pre></div><p>I tinkered around for quite a while before discovering that I can intersect two <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mi>y</mi></mrow><annotation encoding="application/x-tex">xy</annotation></semantics></math></span> skewed ellipses +with the absolute value operator. Here&rsquo;s my custom equation for the heart shape.</p>✨https://lavafroth.is-a.dev/art/sparkles/Tue, 15 Jul 2025 11:52:20 +0530https://lavafroth.is-a.dev/art/sparkles/Amateur Blender Sculpturehttps://lavafroth.is-a.dev/art/amateur-blender-sculpture/Sat, 03 Aug 2024 17:50:00 +0530https://lavafroth.is-a.dev/art/amateur-blender-sculpture/<p>This is my first time trying out sculpting in blender, so forgive me for the quality of the sculpt. I&rsquo;m still pretty much in the learning stage. Big thank you to <a href="https://www.pexels.com/@nichole-sebastian-1592975/">Nichole Sebastian</a> for the reference photo. Also apologies if the empty eye sockets gave you a diff --git a/hearts.avif b/hearts.avif index f2ec20f0..5f85e0c4 100644 Binary files a/hearts.avif and b/hearts.avif differ diff --git a/index.xml b/index.xml index 54dc99ca..b7510c26 100644 --- a/index.xml +++ b/index.xml @@ -1,9 +1,39 @@ -lavafrothhttps://lavafroth.is-a.dev/Recent content on lavafrothHugoen-usSun, 18 Jan 2026 08:06:06 +0530Step to the 💗 beathttps://lavafroth.is-a.dev/art/drawhearts/Sun, 18 Jan 2026 08:06:06 +0530https://lavafroth.is-a.dev/art/drawhearts/<p>My first procedurally generated animation drawing concentric heart -growing from the center of the screen. The source code for the -program used to create this piece is <a href="https://github.com/lavafroth/drawhearts">available on my GitHub</a>.</p> -<p>I tinkered around for quite a while before discovering that I can intersect two <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mi>y</mi></mrow><annotation encoding="application/x-tex">xy</annotation></semantics></math></span> skewed ellipses -with the absolute value operator. Here&rsquo;s my custom equation for the heart shape.</p> -<span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><msup><mi>y</mi><mn>2</mn></msup><mo>−</mo><mi mathvariant="normal">∣</mi><mi>x</mi><mi mathvariant="normal">∣</mi><mi>y</mi><mo>=</mo><mi>r</mi></mrow><annotation encoding="application/x-tex"> x^2 + y^2 - |x|y = r </annotation></semantics></math></span><p>have fun!</p>Working With LUKS File Stasheshttps://lavafroth.is-a.dev/post/working-with-luks-file-stashes/Thu, 01 Jan 2026 07:24:36 +0530https://lavafroth.is-a.dev/post/working-with-luks-file-stashes/<p>LUKS is an incredible solution for encrypting entire partitions in Linux. +lavafrothhttps://lavafroth.is-a.dev/Recent content on lavafrothHugoen-usSun, 18 Jan 2026 08:06:06 +0530Step to the 💗 beathttps://lavafroth.is-a.dev/art/drawhearts/Sun, 18 Jan 2026 08:06:06 +0530https://lavafroth.is-a.dev/art/drawhearts/<p>My first procedurally generated animation using shaders.</p> +<p>The shader can be visualized with <code>glslViewer</code>.</p> +<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-glsl" data-lang="glsl"><span style="display:flex;"><span><span style="color:#66d9ef">uniform</span> <span style="color:#66d9ef">vec2</span> u_mouse; +</span></span><span style="display:flex;"><span><span style="color:#66d9ef">uniform</span> <span style="color:#66d9ef">vec2</span> u_resolution; +</span></span><span style="display:flex;"><span><span style="color:#66d9ef">uniform</span> <span style="color:#66d9ef">float</span> u_time; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span><span style="color:#66d9ef">void</span> main (<span style="color:#66d9ef">void</span>) { +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec2</span> st <span style="color:#f92672">=</span> gl_FragCoord.xy<span style="color:#f92672">/</span>u_resolution.xy; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> aspect <span style="color:#f92672">=</span> u_resolution.x<span style="color:#f92672">/</span>u_resolution.y; +</span></span><span style="display:flex;"><span> st.x <span style="color:#f92672">*=</span> aspect; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#75715e">// positioning shenanigans</span> +</span></span><span style="display:flex;"><span> st.x <span style="color:#f92672">=</span> st.x <span style="color:#f92672">*</span> <span style="color:#ae81ff">2.0</span> <span style="color:#f92672">-</span> <span style="color:#ae81ff">1.8</span>; +</span></span><span style="display:flex;"><span> st.y <span style="color:#f92672">=</span> st.y <span style="color:#f92672">*</span> <span style="color:#ae81ff">2.0</span> <span style="color:#f92672">-</span> <span style="color:#ae81ff">0.9</span>; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> r <span style="color:#f92672">=</span> st.x<span style="color:#f92672">*</span>st.x <span style="color:#f92672">+</span> st.y<span style="color:#f92672">*</span>st.y <span style="color:#f92672">-</span> abs(st.x)<span style="color:#f92672">*</span>st.y; +</span></span><span style="display:flex;"><span> r <span style="color:#f92672">*=</span> <span style="color:#ae81ff">2.0</span>; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> duration <span style="color:#f92672">=</span> <span style="color:#ae81ff">3.0</span>; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> bin <span style="color:#f92672">=</span> <span style="color:#ae81ff">0.1</span>; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> scaled_time <span style="color:#f92672">=</span> fract(u_time<span style="color:#f92672">/</span>duration); +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> loop <span style="color:#f92672">=</span> scaled_time <span style="color:#f92672">*</span> <span style="color:#ae81ff">2.0</span> <span style="color:#f92672">-</span> <span style="color:#ae81ff">1.0</span>; +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">float</span> r_disc <span style="color:#f92672">=</span> floor((r <span style="color:#f92672">+</span> loop<span style="color:#f92672">*</span>loop)<span style="color:#f92672">/</span>bin) <span style="color:#f92672">*</span> bin; +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec3</span> deep_pink <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec3</span>(<span style="color:#ae81ff">0.917</span>, <span style="color:#ae81ff">0.235</span>, <span style="color:#ae81ff">0.478</span>); +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec3</span> light_pink <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec3</span>(<span style="color:#ae81ff">0.976</span>, <span style="color:#ae81ff">0.780</span>, <span style="color:#ae81ff">0.803</span>); +</span></span><span style="display:flex;"><span> +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">if</span> (r_disc <span style="color:#f92672">&gt;=</span> <span style="color:#ae81ff">1.0</span>) { +</span></span><span style="display:flex;"><span> gl_FragColor <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec4</span>(deep_pink, <span style="color:#ae81ff">1.0</span>); +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">return</span>; +</span></span><span style="display:flex;"><span> } +</span></span><span style="display:flex;"><span> <span style="color:#66d9ef">vec3</span> color <span style="color:#f92672">=</span> mix(deep_pink, light_pink, r_disc); +</span></span><span style="display:flex;"><span> gl_FragColor <span style="color:#f92672">=</span> <span style="color:#66d9ef">vec4</span>(color,<span style="color:#ae81ff">1.0</span>); +</span></span><span style="display:flex;"><span>} +</span></span></code></pre></div><p>I tinkered around for quite a while before discovering that I can intersect two <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi><mi>y</mi></mrow><annotation encoding="application/x-tex">xy</annotation></semantics></math></span> skewed ellipses +with the absolute value operator. Here&rsquo;s my custom equation for the heart shape.</p>Working With LUKS File Stasheshttps://lavafroth.is-a.dev/post/working-with-luks-file-stashes/Thu, 01 Jan 2026 07:24:36 +0530https://lavafroth.is-a.dev/post/working-with-luks-file-stashes/<p>LUKS is an incredible solution for encrypting entire partitions in Linux. Often times, however, we can&rsquo;t afford to create new partitions inside a disk without having to completely format the drive anew.</p> <p>This post will guide you through the process of creating and working