RSSAmplifier

Blog

Karthik Karanth

Recent content on Karthik Karanth

/RSS feed ↗63 posts

Latest posts

Beginning to learn the sitar

In October 2023, I had the pleasure of watching a live performance of Anoushka Shankar’s quintet. While I had heard her albums before, listening to it live is a whole different experience. I decided soon after that I would start learning the sitar. I also started listening to more and more Hindustani classical recordings around this time, by artists including Ali Akbar Khan, Ravi Shankar and…

Setting up LUKS encryption on an existing Ubuntu partition

This is a guide to enabling encryption on an existing unencrypted Ubuntu 24.04 partition. Assumptions: 
 
 / and /boot are on different partitions. While it is possible to have a single partition with both the root / and /boot (GRUB), I wasn’t able to get this to work seamlessly, and so spent some time moving /boot to its own partition. We will also assume there’s an EFI…

cat vs nest


 Cat Rigged by Vr-cvantorium, licensed under CCBY4.0

timmy




splash




USS Midway Museum

The USS Midway is an aircraft carrier that served the US Navy from 1945 to 1992. Now, its a museum in San Diego which is well worth a visit. The entire flight deck, the ship’s island, and many sections of the crews’ and officers’ quarters are accessible to the public. 
 
 
 
 
 
 
 Right off the bat, I was impressed by how huge it was from the outside.…

minivet


 
 
 
 


mediocre


 
 
 
 


angler


 
 
 
 


ghost


 
 
 
 


lndscp-1


 
 
 
 


nrvs


 
 
 
 
 
 
 
 
 
 


lndscp-0


 
 
 
 


bee


 
 
 
 


escape


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Performance benchmarking: beware frequency scaling!

I’ve been spending an unreasonable amount of time trying to understanding performance jitters in a C++ application I’m working on. I have been measuring the time taken to execute a physics update as part of a graphics loop, something like: 
 void update () { 
 // Need to analyze performance of this function:
 step_physics (); 
 
 // Regular OpenGL drawing stuff,…

node⥋0


 
 
 
 
 
 


bone hydra


 
 
 
 


Bead sort

&#xA; &#xA; &#xA; <div style="display: flex; justify-content: flex-end;">&#xA; <button class="btn btn-primary" style="" id="reset-btn">Reset</button>&#xA;</div>&#xA; &#xA; &#xA; Bead sort 1 is a sorting algorithm powered by gravity! &#xA; &#xA; For each number x in the array we want to sort, we arrange x beads in a row. &#xA; Let them all drop. &#xA; Count the number of beads in each row from top…

bez

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

orbit

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

gen-9

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

gen-6

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

gen-5

&#xA; &#xA; &#xA; &#xA; &#xA;

gen-4

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

Starting with order: an approach to generative art

I came across an interesting approach in Anders Hoff&rsquo;s writings : &#xA; &#xA; When experimenting with generative algorithms it is sometimes useful to start with a highly organized structure. Then try to find interesting ways to gradually disrupt it. &#xA; &#xA; Let&rsquo;s try this out. Here&rsquo;s a starting point: &#xA; &#xA; let there be particles arranged on the circumference of a…

fracture

&#xA; &#xA; &#xA; &#xA; &#xA;

Finding memory leaks in C&#43;&#43; with heaptrack

While scouring the internet for ways to track memory usage of processes, I found a lot of resources on valgrind(+massif). While valgrind is useful, it slows down your program significantly. This is particularly problematic when you have a memory leak that takes a long time to occur or balloon into a large amount. In my experience, heaptrack runs much faster 1 . Some approaches modify calls to new…

otto-2

&#xA;

Drawing numpy arrays with pygame

While building GPU accelerated cellular automata, I needed a quick way to dump a numpy array of pixels onto the screen. This is pretty simple to do with pygame&rsquo;s surfarray API. You run this in the main drawing loop: &#xA; # Z is a numpy array &#xA; surf = pygame . surfarray . make_surface ( Z ) &#xA; self . display . blit ( surf , ( 0 , 0 )) &#xA; &#xA; pygame . display . update () &#xA;…

otto

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

rube

&#xA;

ele

&#xA; &#xA; &#xA; &#xA; &#xA;

teapot

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; [go to CS 6620]&#xA; &#xA; &#xA; &#xA; &#xA;

mslw

&#xA; &#xA; &#xA; &#xA; &#xA;

gen-1

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

icarus

&#xA; &#xA; &#xA; &#xA; &#xA;

octopus&#39; garden

&#xA; &#xA; &#xA; &#xA; &#xA;

autumn

&#xA; &#xA; &#xA; &#xA; &#xA;

strawberry

&#xA; &#xA; &#xA; &#xA; &#xA;

exhibit

&#xA; &#xA; &#xA; &#xA; &#xA;

My experience with rust&#43;wasm

Over the past few days, I&rsquo;ve been working on a SPH fluid simulator with rust, compiled to wasm. The goal here is more &ldquo;real-time & pretty-looking&rdquo; than &ldquo;offline and accurate&rdquo;. sandspiel was a great motivator to start working on this. &#xA; Update: You can check out the demo here, or the source code here &#xA; I like the way cargo and rust handle having different…

sub

&#xA; &#xA; &#xA; &#xA; &#xA;

blocks maybe

&#xA; &#xA; &#xA; &#xA; &#xA;

Experiment: Denoising ray-traced renders with pix2pix

I trained a pix2pix model to denoise images rendered by Blender&rsquo;s cycles renderer. Here is a validation example from the 400th(and final) epoch: &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; Running it on a completely different view(compared to the training data): &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; A butchered, yet cool image resulted from running it on an unrelated scene: &#xA; &#xA;…

mountains maybe

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

the bullet

&#xA; &#xA; &#xA; &#xA; &#xA;

living room

&#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA; &#xA;

the knight

&#xA; &#xA; &#xA; &#xA; &#xA;

shamisen

&#xA; &#xA; &#xA; &#xA; &#xA;