diff --git a/unity_artifitial_world-st/Assets/LSystem/zadanie_chaber.txt b/unity_artifitial_world-st/Assets/LSystem/zadanie_chaber.txt index 39f1ce6..3ef37c2 100644 --- a/unity_artifitial_world-st/Assets/LSystem/zadanie_chaber.txt +++ b/unity_artifitial_world-st/Assets/LSystem/zadanie_chaber.txt @@ -1,5 +1,5 @@ #axiom -l[-P][++P]P +l[[--l][--l[++ll]l+l[+l[-l]l[+l]l]l[+l]l+l[-l]lK]]ll[+l[-l]llK][++ll]l[-l]llllK #rules # l -> #stochastic # p=3 lL diff --git a/unity_artifitial_world-st/Assets/Scripts/Turtle3D.cs b/unity_artifitial_world-st/Assets/Scripts/Turtle3D.cs index 5a3081e..656042d 100644 --- a/unity_artifitial_world-st/Assets/Scripts/Turtle3D.cs +++ b/unity_artifitial_world-st/Assets/Scripts/Turtle3D.cs @@ -25,6 +25,7 @@ public class Turtle3D : TurtleLSystem { var leaf = (GameObject)AssetDatabase.LoadAssetAtPath(String.Format(path, "leaf"), typeof(GameObject)); //turtleInterpretation + // var transformation = Matrix4x4.Translate(new Vector3(0.0f, 0.1f, 0)) * Matrix4x4.Scale(new Vector3 (0.05f, 0.1f, 0.05f)); var transformation = Matrix4x4.Translate(new Vector3(0.0f, 0.1f, 0)) * Matrix4x4.Scale(new Vector3 (0.05f, 0.1f, 0.05f)); turtleInterpretation.Add("+", (float[] args) => new Tuple(null, Matrix4x4.Rotate(Quaternion.Euler(0, 0, -angle)))); @@ -50,9 +51,9 @@ public class Turtle3D : TurtleLSystem { // Liść jest upośledzony - nie reaguje na zmianę konta tak jak kwiat // L symbol liśc nie działa - proporcje trzeba zwiekszyc dla liscia - turtleInterpretation.Add("P", (float[] args) => new Tuple(leaf, Matrix4x4.Translate(new Vector3(0.1f, 0.1f, 0.1f)) * Matrix4x4.Scale(new Vector3 (1, 1, 1)))); + turtleInterpretation.Add("P", (float[] args) => new Tuple(leaf, Matrix4x4.Translate(new Vector3(0, 0.1f, 0)) * Matrix4x4.Scale(new Vector3 (1, 1, 1)))); } } - \ No newline at end of file +