lindenmayer_systems 0.0.2 copy "lindenmayer_systems: ^0.0.2" to clipboard
lindenmayer_systems: ^0.0.2 copied to clipboard

A Dart library to handle generative grammars known as L-Systems (Lindenmayer Systems).

example/example.dart

import 'package:lindenmayer_systems/src/lindenmayer_systems/dol_system/dol_system.dart';
import 'package:lindenmayer_systems/src/production_rules/production_rule.dart';

void main() {
  final test = DolSystem(
    alphabet: ['A', 'B'],
    axiom: 'AB',
    productionRuleSet: {
      ProductionRule(predecessor: 'A', successor: 'AB'),
      ProductionRule(predecessor: 'B', successor: 'BA'),
    },
  );

  final result = test.generate(1);

  // Expected result is ABBA
  print(result);
}
3
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A Dart library to handle generative grammars known as L-Systems (Lindenmayer Systems).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on lindenmayer_systems