640 likes | 785 Views
Solving Differential Equations in Developmental Models of Multicellular Structures Expressed Using L-systems. Pavol Federl and Przemyslaw Prusinkiewicz University of Calgary. Anabaena. heterocyst cells. vegetative cells. Anabaena. Anabaena – continuous model. Vegetative cells:.
E N D
Solving Differential Equations in Developmental Models of Multicellular Structures Expressed Using L-systems Pavol Federl and Przemyslaw Prusinkiewicz University of Calgary
Anabaena heterocyst cells vegetative cells
Anabaena – continuous model Vegetative cells: Heterocysts:
Review of L-systems and L+C • L+C1 = combination of L-systems and C++ 1. Karwowski and Prusinkiewicz 2002
Review of L-systems and L+C A(2) • Example: cell growth and division A(3) • module A(int); • axiom: A(2); • production: • A(s):{ • if (s<4) • produce A(s+1); • else • produce A(s/2)A(s/2); • } A(4) A(2)A(2) A(3)A(3)
Standard information transfer B(n)<A : produce B(n+1); B(0)AAAAAAA
Standard information transfer B(n)<A : produce B(n+1); B(0)AAAAAAA B(0)B(1)AAAAAA
Standard information transfer B(n)<A : produce B(n+1); B(0)AAAAAAA B(0)B(1)AAAAAA B(0)B(1)B(2)AAAAA
Standard information transfer B(n)<A : produce B(n+1); B(0)AAAAAAA B(0)B(1)AAAAAA B(0)B(1)B(2)AAAAA B(0)B(1)B(2)B(3)AAAA
Standard information transfer B(n)<A : produce B(n+1); B(0)AAAAAAA B(0)B(1)AAAAAA B(0)B(1)B(2)AAAAA B(0)B(1)B(2)B(3)AAAA B(0)B(1)B(2)B(3)B(4)B(5)B(6)B(7) Time complexity: O(n2)
Fast information transfer in L+C B(n)<<A : produce B(n+1); new left context
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1) B(2)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1) B(2) B(3)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1) B(2) B(3) B(4)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1) B(2) B(3) B(4) B(5)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1) B(2) B(3) B(4) B(5) B(6)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1) B(2) B(3) B(4) B(5) B(6) B(7)
Fast information transfer in L+C B(n)<<A : produce B(n+1); B(0) AA A A A A A B(0) B(1) B(2) B(3) B(4) B(5) B(6) B(7) Time complexity: O(n)
Anabaena in L+C • size • concentration • het./veg. struct CD { double s, con; bool h; } module C (struct CD); Start: { CD c1; c1.s=smax; c1.con=cmax; c1.h=true; CD c2; c2.s=smax; c2.con=cmax; c2.h=false; } Axiom: C(c1) C(c2) C(c1);
Anabaena in L+C • Division & differentiation C(p): { if (p.h) produce C(p); else if (p.s >= smax && p.con > cmin) { p.s /= 2; produce C(p) C(p); } else if (p.con < cmin) { p.h=true; produce C(p); }
Anabaena – numerical integration • Discrete time intervals Δt • Implicit discretization scheme • Notation: • Ci denotes old value (at time t) • Ci+1 denotes new value (at time t + Δt)
Implicit scheme • System of linear equations • matrix form: AX=Y • Tri-diagonal coefficient matrix • Efficient solution • modified Gaussian Elimination
b a 0 0 0 y a b c 0 0 y 0 a b c 0 y … 0 0 a b c y 0 0 0 a b y … L-system implementation struct CD { double a,b,c,y; } module C (struct CD);
… … … L-system implementation Phase I Phase II
Gaussian elimination in L+C int phase; Start: {phase=1;} StartEach: { if (phase == 1) {Forward();UseGroup(1);phase=2;} else {Backward();UseGroup(2);} } group 1: C(pl) << C(p):{ p.y=p.y-pl.y*p.a/pl.b; p.b=p.b-pl.c*p.a/pl.b; produce C(p); } group 2: C(p) >> C(pr):{ p.y=p.y-pr.y*p.c/pr.b; produce C(p); }