• Interactive Poisson Blending on GPU
    Interactive Poisson Blending on GPU
  • 404 Not Found In Two Triangles
    404 Not Found In Two Triangles
  • Simplest and Fastest GLSL Edge Detection using Fwidth
    Simplest and Fastest GLSL Edge Detection using Fwidth

Monthly archives: October, 2016

[Summary] Point Set Surfaces & Least Square Meshes

What is the problem addressed by the paper? How to represent smooth shapes? How to smooth surfaces? How to process range-scanned meshes? How to improv normal and boundary continuity? image credit Alexa, et al. What is the approach used to resolve the problem? In differential geometry, a smooth surface is characterized by the existence of smooth…


[Summary] The One Hundred Year Study on Artificial Intelligence: An Enduring Study on AI and its Influence on People and Society

Today, technical fellow and director at Microsoft, Dr. Horvitz gave a lecture on The One Hundred Year Study on Artificial Intelligence: An Enduring Study on AI and its Influence on People and Society; I am also fortunate to have a lunch together with Eric. He has presented an update on the One Hundred Year Study on AI, described…


Fisher-Yates Shuffle

The correct way to do a shuffle is to choose a random other index to fill in the current index, which is uniform:

  Also, you may need a uniform random generator in C++:

 


Protected: Optimization Using Sum-to-Product Identities

There is no excerpt because this is a protected post.


Likert Scale and Paired T-Test Are Not Good Friends

Non-parametric Tests Unfortunately, it’s the first time that I learnt that Likert scale cannot be used together with t-test. According to my favorite Stat Wiki by Prof. Koji Yatani,  Roughly speaking, there are two cases in which you want to use non-parametric test: Ordinal data: If your data are ordinal (like the results from Likert-scale…


What are PCA and FLA / LDA?

PCA The main idea of PCA is to seek the most accurate data representation in a lower dimensional space. For a formal definition, according to Wikipedia, Principal component analysis (PCA) is a statistical procedure that uses an orthogonal transformation to convert a set of observations of possibly correlated variables into a set of values of…


What is P value?

P value is the probability that you are wrong if you reject the null hypothesis. or P value is the probability that you get equal or worse result if your experiment is right… or according to Wikipedia: For example, if you propose a hypothesis that Trump has more positive tweets than Hillary has, the your…


N Queens Problem Revisit using Bit Operations

Finally, I have some time to revisit the N queens problem using bit operations. The following functions could solve 11 queens in 1 second:

So far to me, this is the most efficient algorithm for N queens. The code is mostly self-explenary. Please comment if anything cannot be understood.

 


Simplest and Fatest GLSL Edge Detection using Fwidth

Yesterday, I read 834144373’s ShaderToy code which did Edge Detection in 97 chars, it was really simple and fast:

However, the result is astonishingly good: Let’s expand the code a little bit:

According to OpenGL manual: fwidth means  abs(dFdx(p)) + abs(dFdy(p)) and fwidthFine is equivalent to abs(dFdxFine(p)) + abs(dFdyFine(p)). One can use a sigmoid function to increase the…


Testing GPUs Computational Power

Have you think of how many summation & multiply operations can you do within for-loops in GPU fragment shader? I irrigorously tested the following fragment shader on ShaderToy, which gives me 100,000 operations at 22 FPS on a GTX 1080, for 25, 000 operations, it runs smoothly at 60 FPS. So, what’s the limitation of…