mam chabra jak z wiki

This commit is contained in:
pawlaczyk 2021-04-11 23:15:12 +02:00
parent c88c0cdcb2
commit 4930978062
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#axiom #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 #rules
# l -> #stochastic # l -> #stochastic
# p=3 lL # p=3 lL

View File

@ -25,6 +25,7 @@ public class Turtle3D : TurtleLSystem {
var leaf = (GameObject)AssetDatabase.LoadAssetAtPath(String.Format(path, "leaf"), typeof(GameObject)); var leaf = (GameObject)AssetDatabase.LoadAssetAtPath(String.Format(path, "leaf"), typeof(GameObject));
//turtleInterpretation //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)); 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<GameObject, Matrix4x4>(null, Matrix4x4.Rotate(Quaternion.Euler(0, 0, -angle)))); turtleInterpretation.Add("+", (float[] args) => new Tuple<GameObject, Matrix4x4>(null, Matrix4x4.Rotate(Quaternion.Euler(0, 0, -angle))));
@ -50,7 +51,7 @@ public class Turtle3D : TurtleLSystem {
// Liść jest upośledzony - nie reaguje na zmianę konta tak jak kwiat // Liść jest upośledzony - nie reaguje na zmianę konta tak jak kwiat
// L symbol liśc nie działa - proporcje trzeba zwiekszyc dla liscia // L symbol liśc nie działa - proporcje trzeba zwiekszyc dla liscia
turtleInterpretation.Add("P", (float[] args) => new Tuple<GameObject, Matrix4x4>(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<GameObject, Matrix4x4>(leaf, Matrix4x4.Translate(new Vector3(0, 0.1f, 0)) * Matrix4x4.Scale(new Vector3 (1, 1, 1))));
} }