Last week I sat down to see how I can generate a fractal tree on a web page. It turned out to be a very interesting exercise using HTML5 Canvas and simple Math trigonometric functions. Using random numbers for changing the length of the tree branch, and the angle of branch split -- I was quite successful in generating very realistic looking trees!
Each time you render the HTML, the trees look quite different. I can see how Game creators can create interesting looking forests for "heroes" to travel in using such techniques.
![]() |
HTML 5 Canvas with a Fractal Tree |
Here is the code (also posted on github):
COMPUTERS NEWS
https://nandncomputers.blogspot.com/
Motorola ROKR E8 Unlocked ATT TMobile MP3 Cam-Video Cell Phone - $119
https://nandncomputers.blogspot.com/2009/09/motorola-rokr-e8-unlocked-att-tmobile.html
Professional Social Network-A Must for Today's Professionals
https://nandncomputers.blogspot.com/2011/08/professional-social-network-must-for.html
Useful Microsoft Excel keyboard shortcut..!!!
https://nandncomputers.blogspot.com/2012/06/useful-microsoft-excel-keyboard-shortcut.html
How to Automatically Shrink url of ADF.ly || Earn Money By ADF.ly
https://nandncomputers.blogspot.com/2013/12/how-to-automatically-shrink-url-of.html
Tidak ada komentar:
Posting Komentar