mtg_geom

Document Sample
mtg_geom Powered By Docstoc
					    Ecole Chercheur CIRAD / INRA

 Mesure et analyse de l’architecture des plantes :
Digitalisation et introduction au logiciel AMAPmod




          Geometry of a MTG
Geometry of a MTG
A. Geometry completely specified
                    Geometric Representation
                    j
                    i




                                               x
                                               j
                                               x
                                               j
   geometric model
                                               x
                                               i
+ (x,y,z)    position                          x
                                               i

+ a a a  orientation
    1    2    3
 b     b2   b3 
  1            
  c1
       c2   b3 
                
                     MTG file and GEOM file
FEATURES:
geom      GEOMETRY   stand.geom       Translated TRUNK1 {
app       APPEARANCE stand.app                    Translation <-8,-8,0>
                                                  Geometry Cylinder {
MTG:                                                          Radius 0.5
TOPO               geom     app                               Height 10.5
/A1                                               }
         /T1       TRUNK1 RED2        }
         <C1       CROWN1 GREEN1
/A2                                   Translated CROWN1 {
         /T2       TRUNK2   RED2                  Translation <-8,-8,10>
         <C2       CROWN2   GREEN2                Geometry AsymmetricHull {
/A3                                                           NegXRadius 5
         /T3       TRUNK3   RED2                              PosXRadius 4
         <C3       CROWN3   YELLOW2                           NegYRadius 4.5
/A4                                                           PosYRadius 5
         /T4       TRUNK4   RED2                              NegXHeight 2.5
         <C4       CROWN4   GREEN3                            PosXHeight 3
/A5                                                           NegYHeight 3.5
         /T5       TRUNK5   RED2                              PosYHeight 3
         <C5       CROWN5   GREEN5                            BottomShape 2
/A6                                                           TopShape 0.8
         /T6       TRUNK6   RED2                              Bottom <0,0,0>
         <C6       CROWN6   GREEN6                            Top <0,0,20>
/A7                                               }
         /T7       TRUNK7   RED2      }
         <C7       CROWN7   GREEN7
/A8
              Example: stand as a MTG


AML> g = MTG(« stand1.mtg »)
AML> Plot(g, Scale->2)
B. Geometry partially specified:
    Building a plantframe
                           Geometric Representation
                    j
                    i




                                                               x
                                                               j
                                                               x
                                                               j
   geometric model
                                                               x
                                                               i
+ (x,y,z)    position                                          x
                                                               i

+ a a a  orientation
    1    2    3
 b     b2   b3 
  1            
  c1
       c2   b3 
                

                    Validity Rules : Within-Scale
                            i , x j 
                    Constraintsis an edge, f x i , Mx j 0
                             x              M
                  PlantFrame and LineTree
                                      Definition

                                x

                                x
                           x
                               x x
                                x
                                          x
                                x
                                      x
                                x x

                                x

                                x    (b,t,l)
                                x



   MTG                 PlantFrame                        LineTree
Topology +        - MTG + scale +                 - PlantFrame +
Attribute info.   - location, orientation,        - basic geom. models
                  - generic parameters            (- virtual elements)
                  (bottom, top diameters and length)
                  Within-scale constraints
• Validity rules:
      maintain consistency throughout plant representation at a given scale


• Generic
  geometric models
                        (b,t,l)
                                       (b’,t’,l’)
• General rules:
   - Bottom(x) = Top(Father(x))
   - BottomDiam(x) = TopDiam(Father(x))
   - Length(x) = Length(Father(x)) or Length(x) =Index(x)- Index(Father(x)))
   - Orientation(x) = Orientation(Predecessor(x))
   - Orientation(x) = Orientation(Bearing(x))*insertion*phyllotaxy
   - If a geometric parameter cannot be inferred using
   general rules, use default values (see dressing data)
Multiscale Geometric Representation



      scale 2


                scale 3

i
                                           x
                                           j


                                                          y


                                 scale 3        scale 2

Validity rule : Between-Scale Constraints
   y is decomposed into  i  f y , Mx i 0
                         x , M
                   Between-scale constraints
• Validity rules:
          maintain consistency throughout plant representations
                          at different scales


• General rules:
                                                                         P2
    - If x is linear, Size(x) =    Length( y)
                           Components ( x )
                                                                    P1
    - Bottom(x) = Bottom(FirstComponent(x))
                                                                         P2’
    - If x is axial, Top(x) = Top(LastComponent(x))               P1’
    - BottomDiam(x) = BottomDiam(FirstComponent(x))
    - If x is axial, TopDiam(x) = TopDiam(LastComponent(x))

• User-define rules …
              PlantFrame options:
                     Dressing data


                       Scale


                        Plant Frame (…)



                    Dressing
                    data


AML> dr1 = DressingData(« dress1.drf »)
AML> f = PlantFrame(1, Scale->3, DressingData->dr1)
AML> lt = Plot(f)
                                 Dressing Data:
                        Definition of basic geometric models

    Old way (still available):           New way:

SMBPath= .                                   Geometry = ../../geom1.geom
SMBModel intn = nentn104                     Geometry = ../geom2.geom
SMBModel leaf = oakleaf                      Appearance = app0.app
Class E = intn                               Class E = cylinder0
Class F = fruit                              Class F = fruit
…
                         Dressing Data:
             Default parameters used by PlantFrame


Dividing factors                      Default geometric values for stands
  LengthUnit = 10                        DefaultDistance = 10
  DiameterUnit = 100                     NbPlantsPerLine = 5
  AlphaUnit = 1,…

Default geometric values for plants
  DefaultAlpha = 90
  Alpha = Relative/Absolute
  DefaultTeta = 0, …
  Phyllotaxy = 2/5
  MinLength E = 10, …
  MinThresholdGreen,…
                               Dressing Data:
                     Down-scaling branch forms using
                        between constraints rules

In the dressing file (.drf):

    BranchPattern pat1 = ../curve1.crv
    Form 1 = my_curve

                                  category(_x) = 1
 In the curve file (.crv):
     2              # nb of curves
     My_curve
     3              # nb of points
     0 0 0
     0 7 3
     0 8 20
     …
             PlantFrame options
           Defining a branching system



                  32                         33
                  Scale(32)=3                Scale(33)=4




PlantFrame(32,Scale->4)   PlantFrame(33,Scale->4)
                   PlantFrame options
                             Scale




PlantFrame(1,Scale->2)


                     PlantFrame(1,Scale->3)



                                          PlantFrame(1,Scale->4)
                   PlantFrame options
                             Scale




PlantFrame(1,Scale->2)


                     PlantFrame(1,Scale->3)



                                          PlantFrame(1,Scale->4)
              PlantFrame options
                         Translate




PlantFrame(1,Scale->4)          PlantFrame(1,
                                     Scale->4,
                                     Translated->[4.0,3.0,0.0])
              PlantFrame options
               VoxelDist and TrunkDist




PlantFrame([1,57,…,1245],     PlantFrame([1,57,…,1245],
  Scale->4)
                                Scale->4,
                                TrunkDist-> 100)
          PlantFrame options
                   Mode




MTG   PlantFrame(1,Scale->2)   PlantFrame(1,Scale->2,
                                 Mode->Sympodial)
                        PlantFrame options:
                 TopDiameter and BottomDiameter




tdiam(_x)= …                   tdiam1(_x)= …
PlantFrame(1,Scale->4,         tdiam2(_x)=…
  Topdiameter->tdiam)          PlantFrame(1,Scale->4,
                                 Topdiameter->tdiam1,
                                 BottomDiameter->tdiam2)
                     PlantFrame options:
                                 Length




                                     len(_x)= …
PlantFrame(1,Scale->4)               PlantFrame(1,Scale->4,
                                        Length->len)

            Application of user-defined between-scale rules
                   PlantFrame options:
                             Category




                                     cat(_x)= If Order(_x)==1
PlantFrame(1,Scale->4)                        Then 1 Else 0
                                     PlantFrame(1,Scale->4,
Other example of
                                       Category->cat,
user-defined between-scale rules :
                                       DressingData->dr1)
                            PlantFrame options:
                                         Alpha




PlantFrame(1,Scale->4)            angle(_x)= 90
                                  PlantFrame(1,Scale->4,Alpha->angle)

  In the dressing file:
         Alpha = relative: Angle relative to the bearer (default value)
        Alpha = absolute: Angle relative to the vertical direction
                PlantFrame options:
                 Position and orientation




PlantFrame(1,     PlantFrame(1,                  Red
   Scale->2)         Scale->2,                    =
                     XX->fx,                Entities with
                     YY->fy,
                                               defined
                     ZZ->fz)
                                             coordinates
                            PlantFrame options:
                                    Euler Angles

No euler angles                       Increasing aa’s
                                      (from 0 degrees
                                      at the bottom)


                  PlantFrame(1,…)               PlantFrame(1,…,aa->f,
                                                EulerAngles->apply_euler)

Decreasing bb’s
(from 0 degrees                        Increasing cc’s
at the bottom                          (from 0 degrees
downto negative                        at the bottom)
values upwards)


        PlantFrame(1,…,bb->f ,            PlantFrame(1,…,cc->f ,
        EulerAngles->apply_euler)         EulerAngles->apply_euler)
               PlantFrame options:
                         Origin




PlantFrame(1,Scale->4)        PlantFrame(1,
                                  Scale->4,
                                  Origin->[0.0,2.5,0.0])
     VirtualPatterns
            Type

VirtualPattern(Leaf)
VirtualPattern(DigitizedLeaf)
VirtualPattern(Flower)
VirtualPattern(Fruit)
                  VirtualPattern options:
                  PatternNumber and WhorlSize




PatternNumber=1    PatternNumber=10    PatternNumber=6    PatternNumber=6
WhorlSize=1        WhorlSize =1        WhorlSize =2       WhorlSize =3


p(_x)=6
W(_x)=2
VirtualPattern(Leaf,
   PatternNumber->p,
   WhorlSize->w)
                                      PatternNumber=10   PatternNumber=10

                                      WhorlSize =5       WhorlSize =10
         VirtualPattern options:
                 Class and Color




                            col1(_x)= …
cl(_x)=‘C’
                            # _x is the bearer of the
VirtualPattern(Leaf,        # colored component
  Class -> cl)              VirtualPattern(Leaf,
                              Color -> col1)
           VirtualPattern options:
       TopDiameter, BottomDiameter Length




leaf_size(_x)=10           leaf_size(_x)=5

         VirtualPattern(Leaf,
           TopDiameter->leaf_size,
           BottomDiameter->leaf_size,
           Length -> cl)
              VirtualPattern options:
                       Alpha, Beta




                   Alpha = insertion angle
                   Beta = azimuth

alpha=0, beta=0                                 alpha=0, beta=30
                   All angles are:

                   - expressed in degrees
                   - relative to the bearer




alpha=90, beta=0                              alpha=90, beta=90
                 VirtualPattern options:
                    Position and Orientation

Bottom Coordinates: xx(_x)=…,yy(_x)=…, zz(_x)=…
Euler Angles:    aa(_x)=…,bb(_x)=…, cc(_x)=…




                                                  bb(_x)=-Pi/6

                                                   (Sign –
                                                   to go up)


                  VirtualPattern(DigitizedLeaf,
                    XX->xx, YY->yy,ZZ->zz,
                    AA->aa, BB->bb,CC->cc)
         Plot(PlantFrame) or Plot(LineTree)


     f1=PlanteFrame(1,…)
     Plot(f1)


Or

     f1=PlanteFrame(1,…)
     lt=Plot(f1)
     Plot(lt)                Viewer reference system
                Plot(PlantFrame) option:
                         Color


Plot(f1, Color->Order)                color_fun = …
                                      Plot(f1,
                                        Color->color_fun)
               Plot(PlantFrame) option:
                             Interpol




Plot(f1, Interpol->Height)
      Plot(PlantFrame) option:
                Class




Plot(f1)     class_fun(_x) = If Class(_x)==‘F’ \
               Then ‘S’ Else Undef
             Plot(f1, Class->class_fun)
                Plot(PlantFrame) option:
                   Geometry and Appearance



dr1 = dressingData(« file.drf »)
geom_fun(_x) = # returns a string
app_fun(_x) = # returns a string
lt=Plot(f1, VirtualLeaves->leaf1)
Plot(lt,
  Geometry-> geom_fun,
  Appearance-> app_fun)
           Plot(PlantFrame) option :
                     Show




Plot(f1)             Plot(f1, Show->show_leaves)
              Up-scaling geometry




AML> Plot(f,Scale->3)



                        AML> Plot(f,Scale->1,
                                    Model->AsymmetricHull)
         Implementation of methods for applying
               between-scale constraints
Fit Algorithms are implemented for some particular geometric classes :
                              Geometry

              Group             Primitive        Transformed


            Curve        Surface            Volume          Planar Model


      SOR              Box         Extrusion         Hull           ...

Sphere      Cylinder         Ellipsoid      Asymmetric       Extruded      Convex
         Different types of algorithms


   Extrusion      Uses least square approximation

   Ellipsoid
                  Use inertia axes
   Cylinder

    Sphere
 Convex hull
                  Find a bounding model
Asymmetric hull
 Extruded hull
   Specifying a macro scale

Tagging vertices = Defining a new scale


                 Quotient1(_e) =

                 Quotient2(_e) =
                 Geometry as a function of scale

   1.83952e+06




                                                     9.30061e+06


                            8.077e+
                            6                                         9.23764e+06




4.29762e+06

                                                              7.5095e+06


              8.88681e+06
                                                    7.55637e+06
                                      4.41038e+06
A few illustrations
                             A few examples




    Studying the distribution of
    fruits in coffee trees
    (C. Cilas, C. Godin)
                                              Studying the distribution of
                                              fruits in coffee trees
                                              (F. Danjon et al.)
Light interception in
heterogeneous stands
(C. Nouguier)
      Simplifying parameters




0%        20%            50%




80%       90%            97%
       Growing Eucalyptus


Extrusion




 Ellipsoid




Convex Hull



              Plants generated using AMAPsim (deReffye, Barczy et
              Data model from Coudurier, Caraglio
              al.)
Representation of stand geometry
Representation of stand geometry
   Non uniform geometric representation

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:6/25/2011
language:French
pages:52