Strawberry geometry function

Geometric rule of production for strawberry MTG Vizualisation

openalea.strawberry.geometry.bud(g, vid, turtle)[source]

Generates the buds in the turtle

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (Turtle) – Turtle

openalea.strawberry.geometry.bud2d(g, vid, turtle)[source]

Return a bud shape

Returns

the bud shape (a sphere)

Return type

Sphere

openalea.strawberry.geometry.colors_turtle(turtle)[source]

Set the color pallette to the turtle

Parameters

turtle (Turtle) – Turtle

Returns

return the turtle with initiated colors

Return type

Turtle

openalea.strawberry.geometry.get_symbols()[source]

Get the possible symbols to read the mtg

Returns

a dictionnary which associate each geometrical fonction phytomer, inflorescence, TerminalBud, phytomer_primordia, inflo_primordia,stolon to F, HT, bt, ht, s

Return type

dict

openalea.strawberry.geometry.get_symbols2d()[source]

Get the possible symbols to read the mtg

Returns

a dictionnary which associate each geometrical fonction phytomer, inflorescence, TerminalBud, phytomer_primordia, inflo_primordia,stolon to F, HT, bt, ht, s

Return type

dict

openalea.strawberry.geometry.inflo_primordia(g, vid, turtle)[source]
Generates inflorescence primordia

ht: Primordia inflorescence

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (Turtle) – Turtle

Returns

for each ht in mtg return an object compose of a cylinder and a of orange cube

Return type

[type]

openalea.strawberry.geometry.inflo_primordia2d(g, vid, turtle)[source]
Generates inflorescence primordia

ht: Primordia inflorescence

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (Turtle) – Turtle

Returns

for each ht in mtg return an object compose of a cylinder and a of orange cube

Return type

[type]

openalea.strawberry.geometry.inflorescence(g, vid, turtle)[source]

Generates the inflorescences

HT: inflorescence Box (may change) for each HT in mtg return an object compose of cylender and a blue box. Shape of the box is dependent of the number of total flower and number of open flowers.

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (Turtle) – Turtle

Returns

for each HT in mtg return an object compose of cylender and a blue box.

Return type

[type]

openalea.strawberry.geometry.inflorescence2d(g, v, turtle)[source]
openalea.strawberry.geometry.leaflet(length=1.0, width=1.0)[source]

Generate a strawberry leaf

Parameters
  • length (float, optional) – length of the leaflet, defaults to 1.

  • width (float, optional) – width of the leaflet, defaults to 1.

Returns

A strawberry leaf composed of three discs

Return type

pgl.Group

openalea.strawberry.geometry.leaflet2d(length=1, width=1)[source]

Generate a strawberry leaf

Parameters
  • length (float, optional) – length of the leaflet, defaults to 1.

  • width (float, optional) – width of the leaflet, defaults to 1.

Returns

A strawberry leaf composed of three discs

Return type

pgl.Group

openalea.strawberry.geometry.phytomer(g, vid, turtle)[source]
Generates a phytomer

F: Petiol + 3 lobes. cylinder + 3 ellipse/surface

Parameters
  • g (MTG) – MTG

  • vid (int) – selected vid

  • turtle (Trutle) – the turtle that travel

Returns

for each F in mtg return an object compose of petiol (2 cylinder) and 3 lobes (leaflet)

Return type

[type]

openalea.strawberry.geometry.phytomer2d(g, vid, turtle)[source]
Generates a phytomer

F: Petiol + 3 lobes. cylinder + 3 ellipse/surface

Parameters
  • g (MTG) – MTG

  • vid (int) – selected vid

  • turtle (Trutle) – the turtle that travel

Returns

for each F in mtg return an object compose of petiol (2 cylinder) and 3 lobes (leaflet)

Return type

[type]

openalea.strawberry.geometry.phytomer_primordia(g, vid, turtle)[source]
Generates the phytomer primordia

f: Petiol + 3 lobes. cylinder + 3 ellipse/surface

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (openalea.pltgl.turtle) – the Turtle that travel

Returns

for each f in mtg return an object compose of petiol (2 cylinder) and 3 lobes (leaflet)

Return type

[type]

openalea.strawberry.geometry.stolon(g, vid, turtle)[source]

Generates the stolons in the turtle

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (Turtle) – Turtle

openalea.strawberry.geometry.stolon2d(g, v, turtle)[source]
openalea.strawberry.geometry.stolon_curve(scale=1.0)[source]

Generates the stolon as curves

Parameters

scale (float, optional) – size of the stolon, defaults to 1.

Returns

return a curve to for symbolise a stolon

Return type

plf.BezierCurve2D

openalea.strawberry.geometry.trifoliate(g, vid, turtle)[source]
Generates the trifoliate in the turtle

F: Petiol + 3 lobes. cylinder + 3 ellipse/surface

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (Turtle) – Turtle

openalea.strawberry.geometry.trileaflet(length=1.0, width=1.0)[source]

Generates a trileaflet shape

Parameters
  • length (float, optional) – length of the shape, defaults to 1.

  • width (float, optional) – width of the shape, defaults to 1.

Returns

the shape

Return type

pgl.Group

openalea.strawberry.geometry.unifoliate(g, vid, turtle)[source]
Generates the unifoliate in the turtle

F: Petiol + 3 lobes. cylinder + 3 ellipse/surface

Parameters
  • g (MTG) – MTG

  • vid (int) – vid selected

  • turtle (Turtle) – Turtle

openalea.strawberry.geometry.unileaflet(length=1.0, width=1.0)[source]

Generates a unileaflet shape

Parameters
  • length (float, optional) – length of the shape, defaults to 1.

  • width (float, optional) – width of the shape, defaults to 1.

Returns

the shape

Return type

pgl.Group