Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Dynamic L-System Growth Overhaul #103

Open
M1thieu opened this issue Jan 30, 2025 · 0 comments
Open

🌱 Dynamic L-System Growth Overhaul #103

M1thieu opened this issue Jan 30, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request optimization
Milestone

Comments

@M1thieu
Copy link
Collaborator

M1thieu commented Jan 30, 2025

Problem Description

Currently, LP's L-System plant generation relies on predefined, hardcoded rules in fractals.json.

  • Issue: Every plant follows the same structure, limiting diversity.
  • Lack of Adaptability: We manually define how plants grow instead of letting the system generate their behavior.
  • Not Universal: We can't generate all fractals or plant types without rewriting JSON.

Proposed Solution

Instead of storing fixed rules, we introduce dynamic rule generation:

  • Define growth behaviors instead of hardcoded symbols.
  • Generate L-System rules dynamically based on randomness, probability, and plant parameters.
  • Ensure infinite variation while keeping deterministic results through seeding.

Alternatives Considered

  • Manual expansion of rule sets (too static, not scalable).
  • Predefined plant categories (would restrict emergent behavior)

Additional Context

  • Modify fractals.json to store growth behaviors instead of explicit rules (still needs to test it out):

Before:

{
  "rules": { "F": "F[+F]F[-F]F" }
}

After:

"growth_behavior": {
  "branching_probability": 0.7,
  "split_angle_range": [20, 40],
  "recursion_depth": [2, 6]
}

This system will allow any plant/fractal to emerge procedurally in LP’s ecosystem without having to define "oak" for oak, it would define itself.
Future improvements include:

  • Adaptive growth based on environment (light, terrain, water).
  • Plant evolution and mutation over generations.
  • Physics-aware structures (branch weight, collapse mechanics).
@M1thieu M1thieu added enhancement New feature or request optimization labels Jan 30, 2025
@M1thieu M1thieu added this to the 0.X milestone Jan 30, 2025
@M1thieu M1thieu self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request optimization
Projects
None yet
Development

No branches or pull requests

1 participant