Forum Moderators: coopster

Message Too Old, No Replies

Image modification with number of articles

Image of a tree changes as the articles increase

         

kkonline

3:50 am on Aug 24, 2007 (gmt 0)

10+ Year Member



I am working with an article manager. I need to modify image of a tree (or plant) as the number of articles increase or as number of users grow.

That means for every 10 articles posted in the db the image of tree/plant should modify itself and grow a branch.

For every member who registers it should modify itself to grow a leaf.

The tree image is visible on the front page of the site; and it's branches and leaves should reflect the current number of articles and members.

I don't have any clue how to implement such a thing. But i think some kind of image modification should be there in php

SteveLetwin

6:04 am on Aug 24, 2007 (gmt 0)

10+ Year Member



L-systems by Lindenmeyer. "The Algorithmic Beauty Of Plants"

Of course that might be a bit overkill. But regardless, it's an awesome book.

vincevincevince

6:13 am on Aug 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It is an interesting problem and one which will require quite a bit of work. The key image manipulation functions in PHP are based on GD and prefixed with 'image'. You can read about them here at php.net [my.php.net].

Unless you are talking a tree with potentially thousands of branches, my inclination would be to just draw the tree manually, one branch at a time, and saving the image after each new branch. Eventually I'd have a set of images numbered by the branch count and I'd be able to use the appropriate one based on how many branches should be shown at that time.

jatar_k

12:17 pm on Aug 24, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



cool idea kkonline

pretty complex. You would need an equation or mathematical representation of the tree/growth first I would think and start using lines for branches and a simple image for leaves. You could make it more complex if you could get the basics working.

Vince's series of images is probably the way I would go