Bezier Curves - 4pt Subdivision & Gaussian Blur

This application implements a Bezier curve defined by control Points. This curve is generated by the 4pt scheme.
The weights mask used for new vertex's are (1/8,3/8,3/8,1/8). The weights used for existing vertex's are
(1/16,3/16,1/2,3/16,1/16).

Illustrated is the 4pt scheme concept:

Red Dots: Are your control points, the user can change these as pleased.
Blue Dots: On your first subdivision these points are created from weighted values of each control point.
For example. The middle blue dot is a product of (1/8*(1)+3/8*(4)+3/8*(6)+1/8*(8)) for the X and similar for the Y. As you can see our weights (1/8,3/8,3/8,1/8) are applied correctly.
Teal Dots: The exisiting vertex's are then applied the mask of (1/16,3/16,1/2,3/16,1/16).

The number of iterations you do this decides the smoothness of the curve.

Below is the number of iterations increasing (left to right -> no iterations, 1 iter. , 5 iter.)

 

Gaussian Blur

My Gaussian Blur mask is defined as having weights:

int gauss_blur[blur_w][blur_h]=
{2,1,2}
{1,4,1}
{2,1,2}

For the blurring, I apply the mask to the pixels that surround the curve, grab the RGB component of the pixel, and apply the weights to the RGB. These new values are saved to a pixel buffer in OPENGL and then is used to replace the current buffer. Thus creating a blur effect. Using different gauss_blur filters really acheives weird blur.

So this only achieves a blur, what you have to do after this, is add a variable to each pixel color and have the mask also change the pixel color as well. Then you will get bleeding/bluring. The picture above shows the filter being applied. The '4' is the location of the new pixel color.

Download here for the Application. Left-Click plots control points, Right-Click drags the control points.