Suos
Cultores
Scientia
Coronat

## Recent Posts

• ### From LaTeX to Jekyll markdown: towards faster post compilation

Recently, I updated my texlive distribution to 2019. I think I am experiencing a huge boost in compilation speed, though I have not yet done some serious comparison. As I start to take notes with Jekyll in this semester, a problem gradually stands out: speed. Writing with Jekyll are slow in two ways. Firstly, its compilation speed is slow. Secondly, it does not provide any navigation functionality. Therefore, if I am able to write my posts in $\LaTeX$ and convert them into Jekyll markdown afterwards, I can potentially save a lot of time.

• ### Emulating Ubuntu Terminal with LaTeX

This semester, one of the courses that I attend requires screenshot of terminal output as a proof of completion. Personally, I dislike including screenshots in my submissions as their nature is very different from the dominating component of the document (i.e. text). The reader (grader) is unable to interact with the image, and the difference in resolution and format will bring more trouble for him/her. Therefore, I would like to emulate Ubuntu terminal within $\LaTeX$ documens, and the output would be text-based.

• ### PyCG 8: Audio Oscilloscope

Oscilloscope music is a very unique music genre, which is mainly developped by Jerobeam Fenderson (see the video below as an example). The idea is that you can not only listen to it, but you can also see it visually. Indeed, if you pass the audio signal into an oscilloscope, the fancy patterns cleverly designed by the artist will be revealed. This time, let us find out how to visualize the wave form given an oscilloscope music.

• ### PyCG 7: Simple Ray Tracing

Ray tracing is a way of rendering photo-realistic photos. I made use of this concept in this post to compute the image of projecting on a spherical screen. This time, let us build a simple ray tracer with Python. This time, OpenGL is not needed.

• ### Extending Jekyll: A Simple Ruby Program For Indexing

I try to take my notes digitally last semester with the help of $\LaTeX$, and I find it really helpful for me and my classmates. However, $\LaTeX$ files needs compiling, and the resulting pdf files is not very well integrated into the web environment either, which makes it very difficult to update changes to the notes. Therefore, I decide to use my blog as my new platform to hold my notes. Actually everything is great about composing notes with Jekyll, but there is only one thing missing - indexing, which is very helpful for class notes. As I realize that there is no existing Jekyll plugins supporting this feature, I have to build one on my own, with Ruby.

• ### PyCG 6: Cloth Simulation

The computer graphics lecture at Berkeley constantly uses awesome cloth simulation videos (e.g. this one) to demonstrate the beauty of computer graphics, and I was truly absorbed by it. As it turns out, the mathematics behind it is not very difficult to understand, and it can be fairly easy to build a simple simulation.

• ### PyCG 5: Inverse Kinematics

Have you ever wondered how robotic arms control each of its segments so that its tip locates at an precise location? This is exactly one of the topics of inverse kinematics. Inverse kinematics is the mathematical process of recovering the movements of an object in the world from some other data, such as a film of those movements, or a film of the world as seen by a camera which is itself making those movements. In this case, the data we know is where the tip of the arm should be, and we would like to find out a way to position the arm segments correctly.

• ### Spherical Projection Correction

In this article I briefly discussed and demonstrated how to simulate projecting images onto a spherical screen with a normal projector. Now, the problem comes naturally: how do we correct the image so that it looks right? By modifying the PyOpenGL program slightly, we can have a image generator that can help us analyze this problem and formulate a solution.

• ### PyCG 4: Spherical Projection

I think most of you may have heard of the concept of dome theaters. Basically, the screen of these type of theaters are not a flat plane, but instead a sphere-like surface.

Usually they use special projectors to generate correct images on the screen. But have you ever wondered what it is like if we use a normal projector on one of these screens? With OpenGL and Python, we can develop a simulation program for this scenario very quickly.

• ### PyCG 3: Rendering Textures and Text

It is very common to render images and text in OpenGL programs. In OpenGL, both tasks can be done using textures. With the help of numerous helpful Python packages, it is much easier to load images under PyOpenGL environment.