Boston University CS 580 Final Project Masha Shugrina Problem Summary: To model the development of the above blossoms and to create continuous animation of their development using the dL-system method. General Method: The algorithm is based on the work of Prusinkiewicz et al [1], that extends the discretized approach for producing recursively branching structures (L-systems) to continuous domain in order to produce animation of plant development (dL-systmes). L-Systems model plant development by a set of rewriting rules that transform a particular plant element P (i.e. branch, etc.) to another element(s) (for instance, to the former branch and two new sub-branches): [P] &larr [R1P'1][R2P'2],where R is some transformation matrix. dL-systems model the continuous transformation of a plant element P between these discretized steps, where P now has continuously varying parameter vector x: P(x): if(x < xmax) solve for &Delta x x &larr x + &Delta x else produce P(x) &larr P(x)[R1P'1(x0)][R2P'2(x0)],where x could represent a threshold length up to which the branch grows before splitting. Because plants often develop sigmoidally (initially grow slowly, then accelerate, then level off near the maximum value), the growth function used for calculating most &Delta x's in this project was Velhurst's logistic function, as suggested by [1]: dx/dt = r (1 - x / xmax) x,where r is a constant parameter. Although a closed form solution for this differential equation exists, it is more convenient to use Euler's forward method for approximating the solution at discrete steps &Delta T.
Particulars & Results: Click on the icons to watch clips.
1. Growing the Branch:
2. Flowering Apex:
3. Individual Flower Development: F(P(x1), L(x2), S(x3), AP, AL, width): &forall i: if (x1 &le x1max) solve dx/dt = r1 (1 - x1 / x1max) x1; Pi(x1) &larr P(x1 + &Delta x1) if (x2 &le x2max) solve dx/dt = r1 (1 - x2 / x2max) x2; Li(x2) &larr L(x2 + &Delta x2) if (x3 &le x3max) solve dx/dt = r2 (1 - x3 / x3max) x3; Si(x3) &larr S(x3 + &Delta x3) if (ALi < ALmax) solve dA/dt = r3 (1 - ALi/ALmax) ALi; ALi &larr ALi + &Delta A if (APi < APmax) solve dA/dt = r4 (1 - APi/APmax) APi; APi &larr APi + &Delta A if (width &le widthmax) solve dw/dt = r1 (1 - width / widthmax) x3; width &larr width + &Delta widthwhere P is a petal, L a leaflet, S a stamen, AP rotation angle of a petal, AL rotation angle of a leaflet, and w is the width of the flower base. The rates for petal, leaflet and bud base growth are nearly idtentical, but are perturbed for every petal and leaflet. The rate of opening (growth rate of angles) for the leaflets is greater than for the petals: r3>r4. A different rate controls the growth and elongation of stamena whose development occurs after the bud has half-opened. The scale of all flower elements is a function of the flower center width.
4. Petals and Leaflets:
5. Stamena: Still Images (click): References: 1. Prusinkiewicz, Przemyslaw, Mark Hammel and Eric Mjolsness. "Animation of Plant Development." Proceedings of SIGGRAPH '93, pp. 351-360. 2. Prusinkiewicz, Przemyslaw and Aristid Lindenmayer. Algorithmic Beauty of Plants. Springer-Verlag: New York, 1990. Program: The program is a simple console application built in VC++. It compiles and runs on Windows using the OpenCV and OpenGL libraries. The most important files in the bundle are modules.cpp and const.h. Keyboard commands are as follows: Q: Quit R: Reset default view I: Zoom In O: Zoom Out G: "Gas" -- speed up animation B: "Break" -- slow down the animation S: Start or stop (if already saving) saving video clip into file test01.avi D: Toggle between views of growing FLOWER, APEX, BRANCH, STAMEN, and PETAL W: Toggle between Working and non_Working views (mesh v. texture-mapped surfaces) N: Resets whichever component is displayed to its initial state |