Monday, May 19, 2014

Technique: Selection Sort Animation

    Selection sort step by step animation, for the programming beginners to get a better understanding of selection sort algorithm.(Click snail button to start animation and click it again to go back to the first page)


Cost: O(n^2)
Worst case: O(n^2)
Best case: O(n)

Selection sort code in C++:

void SelectionSort(int a[],int size)
{
       for(int i=0;i<size-1;i++)
       {
               int min=i;
               for(int j=i+1;j<size;j++)
               {
                      if(a[j]<a[min])
                      {
                             min=j;
                      }
                }

                if (min > i)
                      swap(a[i],a[min]);
        }
}

int main()
{
   int a[]={25,49,8,25,21,16,32};
   SelectionSort(a,7);

}


More technique animations:

Heap Sort
Binary Search
Merge Sort
Quick Sort
Bubble Sort

Wednesday, April 2, 2014

Technique: Bubble Sort Animation

    Bubble sort step by step animation, for the programming beginners to get a better understanding of bubble sort algorithm.(Click snail button to start animation and click it again to go back to the first page)



Cost: O(n^2)
Worst case: O(n^2)
Best case: O(n)

Bubble sort code in C++:

void BubbleSort(int a[],int n)
{
    for(int i=1; i<n; i++
    {
                  for(int j=0; j<n-i; j++)
                  {
                      if(a[j] > a[j+1])
                       {
                         int temp;
                               temp = a[j];
                               a[j] = a[j+1];
                                    a[j+1] = temp;
                      }
                  }
    }
}

int main()
{
    int a[]={25,49,8,25,21,16,32};
    BubbleSort(a,7);

}


More technique animations:

Heap Sort
Binary Search
Merge Sort
Quick Sort
Selection Sort

Sunday, March 2, 2014

Knitting Painting 8" x 10”

    I always want  to try different styles of knitting works. This painting is 8" x 10". Before started, I went to the frame store to measure the size of picture I was going to make so I can pick a nice frame later. The background is simple purl needle knitting pattern. The girl, flower and butterfly are made by crochet.
   

    Actually the initial idea in my mind is to make the girl holding an umbrella in the rain. But the handle of umbrella didn't fit the girl very well. I decided to use hat instead.   


    I named this painting "Waiting for the wind". Just the first name pop up my mind. Wind is complicate, it can be good or bad. In a sunny day, a girl looked out into the field beyond view, the bird, the cloud, the butterfly and the flowers. Everything is quite and beautiful. She is waiting for something, something could be peace or challenge.


    Just moved to new place, wish I can have a new life, just like this girl



Sunday, December 1, 2013

Knitting Babapapa Family

    After hard working for ONE YEAR (more specifically 1 year + 1 month), I finally finished my giant piece of work: Babapapa Family.






               

   If I know I would spend more than one year on a knitting work, I probably would not even start. I thought about giving up for several times. The biggest difficulty is you never know what is the best portion of your character before you started. Especially Babapapa had a soft round shape of body, after I filled the cotton, all the body curves were gone, became a round ball. It is hard to make all boys and girls the same size with the same body curves;it is hard to tell the best size of the eyes and the smile because 3D effective is just so different from your drawing on a paper; It is hard to design the gestures of every character, which have to reflect their personalities and can be presentable by knitting.      


Mimic Babapapa Logo

    If you are too young, you might not hear about this cartoon. Babapapa is a French animation that was very popular during early 1990's. Babapapa family members have a special ability: they can change to anything they want like transformers. This cartoon talks about the life of Babapapa and his family, describes how they overcome difficulties to build their home and how they help people and animals. My mom bought me this cartoon book translated in Chinese when I was a child. I can not remember how many times I read it. It is a animation that accompanied me to grow, which is also the reason I made this knitting work.

Before adding faces,like a  rainbow

Babapapa and Babamama

    Below is each character in details:

    --Babapapa & Babamama
    The story started with Babapapa born from the earth just like a seed. He helped a lot of people with his transformation ability.





    Babapapa went for a long trip to looking for other kind of "Babapapa". He went to British, America, India, Africa even outer space, finally found Babamama. They fell in love and have 7 kids represents rainbow.


    ----Bababravo
    Red Bababravo is good at all kinds of sports.He is holding a dumbbell.


    ----Babalib

    Orange Babalib is a hard working girl. She likes reading and studying.

   
    ----Babazoo
    Yellow Babazoo is a kind-hearted boy,and likes make friend with animals. I thought about which animal to make for long time. Chose pig because it can stand on the ground and the color matches yellow very well. 






    ----Babalala
    Green Babalala loves music.I made her playing flute.



     

    ----Bababarbright
    Blue Bababarbright is a little scientist. he is interested in Biology, Chemistry and Physics. He is holding a telescope on his hands.

      




 
    ----Bababelle
    Purple Bababelle is a beautiful girl with long eye lashes. She loves dressing up, so she takes a mirror along with her all the time.


           

    ----Bababeau
    Black Babaeau is an artist. Different from other children, he has fluffy hair covered his body. He likes drawing. 




    Celebrate 3 years old birthday of this blog. Say good bye to Babapapa and hopefully I will have more time to create interesting things next year.

  Wish everyone has a beautiful family like Babapapa