Hello, I’m Mauricio

Hugo

Installation Installing Hugo brew update brew install hugo Adding Theme git clone https://github.com/adityatelange/hugo-PaperMod themes/PaperMod --depth=1 Update hugo.yaml to include theme: ['PaperMod']. Adding New Post hugo new content content/posts/my-post-title.md Troubleshooting hugo --cleanDestinationDir Serving Locally hugo server --buildDrafts Use --buildDrafts flag to include posts with draft: true. Latex \( \begin{bmatrix} a & b \\\ c & d \end{bmatrix} \) \( \Theta \) \( \xcancel{ABC} \) Basics Hugo is a static site generator written in Go. ...

Software Defined Radio

When I found out there was an affordable USB device capable of tuning to a wide range of frequencies allowing me to have a glimpse into the Ham Radio world, which decades ago would have likely cost me thousands and required huge racks of hardware, I knew I had to get my hands on one. This is possible with SDR (Software Defined Radios) receivers. I got the RTL-SDR V3, and after playing with it a bit listeting to different frequencies, my main goal became trying to capture signals from weather satellites that transmit live images of Earth. After browsing the topic, I knew NOAA (National Oceanic and Atmospheric Administration) should be my first target, since all you need is a dipole antenna, an SDR device, and a computer to get started. ...

DSA

Strategies Brute Force Greedy Divide and Conquer Dynamic Programming Linear Containers Array Static Array (Fixed size) Dynamic Array (Growable) List Single Linked List Double Linked List Circular Linked List Queue Simple Queue Circular Queue Priority Queue Stack Deque Nom-Linear Containers Graphs Directed Graph Undirected Graph Weighted Graph Unweighted Graph Trees Binary Tree Binary Search Tree AVL Tree Red-Black Tree B-Tree B+Tree Trie Heap Min Heap Max Heap Hash-based Hash Map Sets Union Find Disjoint Set Algorithms Sorting Bubble Sort Selection Sort Insertion Sort Merge Sort Quick Sort Heap Sort Searching Linear Search Binary Search Graph Algorithms Binary Search Tree Breadth-First Search (BFS) Depth-First Search (DFS) Dijkstra’s Algorithm Kruskal’s Algorithm Prim’s Algorithm Graph Coloring Travelling Salesman Problem Hamiltonian Cycle Minimum Spanning Tree

The 1st Post

This is my first attempt using Hugo to generate this website from plain markdown.

Vectors

Definition In math, a vector is object that has a magnitude and a direction. The components of a vector are the numbers that describe the vector in a coordinate system. A common coordinate system is the Cartesian coordinate system which uses the x, y, and z axes. In programming, we can implement a vector as an array of numbers. A 2D vector, for example, can be defined as an array of 2 floats. A 3D vector can be defined as an array of 3 floats. ...

WebGL

How awesome would be if we could controler the powerful GPU from the browser using JavaScript? Well, we can with WebGL. The WebGL has limitation if we compare with modern OpenGL, but it is still offer a great way to create 3D graphics in the browser. Canvas and WebGL Context The <canvas> element is the HTML element that we need to use to access the WebGL context. The WebGL context is the object that we will use define programs, shaders, buffers, etc. ...

Ray Tracing

If you’re into computer graphics, there’s a chance you’ve come across the famous ray tracing in one weekend. If not, well, I’m happy to be the first to introduce you. I decided to take on the challenge and try to make a simplified version using a simple HTML Canvas. Algorithm In a rough way, the overwall algorithm goes like this 1. Create the world (aka scene) 2. Put the eye (aka camera) in the scene. It can be at origin and poiting towards +z axis for now. 3. Put the virtual canvas (aka viewport) in the scene, in front of the camera. 4. Compute the viewport_step_x as viewport_w / image_w 5. For each pixel of the canvas (aka image). 5.1. Create a ray from eye to viewport. 5.2. For each sphere in scene. 5.2.1. Check if ray hits using baskara, parametric equation, sphere equation. 5.3. Update loop variables

C Language

Random notes about the C language. Entry Point The main function is the entry point of the program. It is the first function that is called when the program starts. int main(void) { return 0; } Compilation and Linking The C compiler (cc) compiles each source code into object files. cc -c file1.c file2.c The -c option tells the compiler to compile only and not to link. The object files are then linked together to form an executable. ...

Web Audio API

Modern web browsers support the Web Audio API, which allows us to create and manipulate audio streams. Audio Context The AudioContext object is the main entry point for the Web Audio API. Audio Nodes and Chains The AudioNode interface is the base interface for all nodes in the audio processing graph. We can connect audio nodes together to create a chain of nodes. For example, we can start with the OscillatorNode to generate a sine wave, and then connect it to the GainNode to control the volume of the sound, and then connect it to the DestinationNode to play the sound to the speakers (or any other output device connected to the computer). ...