SYSU
博学
审问
慎思
明辨
笃行
SYR
Suos
Cultores
Scientia
Coronat

Recent Posts

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

    Output of the demo
  • Extending Jekyll: A Simple Ruby Program For Indexing

    I try to take my notes digitally last semester with the help of , and I find it really helpful for me and my classmates. However, 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.

    Video capture of the demo. The video is sped up five times.
  • 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.

    Video capture of the demo
  • 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.

    A dome theater

    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.

  • PyCG 2: Basic 3D Rendering and Lighting

    Since it is very common to render 3D objects in practice, this time we are looking at the basics of rendering 3D objects with illumination effects.

  • PyCG 1: Introduction

    Although there are a handful of tools for visualizing data in Python, nothing can come close to OpenGL regarding performance and interaction. As for myself, I have found two cases where I have to use OpenGL inevitably: there was once when I need to write a demonstration of solving partial differential equations to animate liquid surface; and there was another time when I needed to build an interactive program that shows what it is like if a projector is presenting its image on a spherical surface. I will elaborate on these two cases during this series of tutorials.