Terkwood / forest

Draw trees using L Systems in godot and rust
MIT License
19 stars 2 forks source link

Draw something #2

Closed Terkwood closed 4 years ago

Terkwood commented 5 years ago

https://docs.godotengine.org/en/3.1/tutorials/2d/custom_drawing_in_2d.html

https://github.com/mneumann/lindenmayer-system/blob/master/examples/fractal_plant.rs

Terkwood commented 5 years ago

http://algorithmicbotany.org/papers/abop/abop-ch2.pdf

Terkwood commented 5 years ago

https://docs.godotengine.org/en/3.1/classes/class_line2d.html#class-line2d-method-add-point

Terkwood commented 5 years ago
extends Node2D

func _ready():
    var l = Line2D.new()
    l.width = 20
    var p0 = Vector2(0,0)
    var p1 = Vector2(600,0).rotated(deg2rad(22.5))
    var p2 = Vector2(600,0).rotated(deg2rad(22.5 + 22.5)) + p1

    l.add_point(p0)
    l.add_point(p1)
    l.add_point(p2)

    add_child(l)
Terkwood commented 4 years ago
Screen Shot 2019-12-06 at 3 39 11 PM
Terkwood commented 4 years ago

https://github.com/GodotNativeTools/godot-rust/issues/163#issuecomment-491235343

Terkwood commented 4 years ago
Screen Shot 2019-12-06 at 5 55 56 PM
Terkwood commented 4 years ago

https://docs.godotengine.org/en/3.1/tutorials/2d/2d_meshes.html

Terkwood commented 4 years ago

https://randommomentania.com/2018/11/godot-surface-tool-tutorial/

Terkwood commented 4 years ago

https://github.com/RazrFalcon/resvg