Phelio Gnomi

My words from my mind

Monthly Archives: January 2012

Guess the Number

Want to challenge my code to guess your number? Feel free to play my new game. Well, of course it’s not a new game, it’s just another duplicated popular game that probably had been played before the existence of Egyptians.

Here is the jsfiddle link. Feel free to modify the codes.


Curve made of lines

I was playing with WebGL the other day and was trying to create some cool and beautiful random triangles after watching the Doodling in Math Class video on youtube. Well, I did create a function to randomly create one triangle. Yes, only one triangle. Not sure how to write the algorithm to make my computer draw triangles as good as the lady in the video did.

And then, I figured out that, WebGL is not a correct term for what I’ve done. Basically, I didn’t actually use WebGL. WebGL is more powerful and support 3D drawing. What I was using was only the native build in HTML5 Canvas 2D library (not sure what it’s really called).

And then, I started to remember what we used to do during math class when I was younger. We draw lines on the edge of the pages and it become a nicely drawn decorative curve. So, using my newly learned drawing skill, I started to draw lines. And here is what I’ve got, a randomly generated, colourful, on the edge curve. Feel free to play around it and hope you enjoy it.