From c88c0cdcb289d8af5bf0849e07b4a83d5d146454 Mon Sep 17 00:00:00 2001 From: pawlaczyk Date: Sun, 11 Apr 2021 21:35:34 +0200 Subject: [PATCH] plik lisia jest uposledzony - nie reaguje na zmiany kata jak kwiat --- unity_artifitial_world-st/Assets/LSystem/zadanie_chaber.txt | 2 +- unity_artifitial_world-st/Assets/Scripts/Turtle3D.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/unity_artifitial_world-st/Assets/LSystem/zadanie_chaber.txt b/unity_artifitial_world-st/Assets/LSystem/zadanie_chaber.txt index 7019a25..39f1ce6 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 -lP +l[-P][++P]P #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 96e4f90..5a3081e 100644 --- a/unity_artifitial_world-st/Assets/Scripts/Turtle3D.cs +++ b/unity_artifitial_world-st/Assets/Scripts/Turtle3D.cs @@ -47,8 +47,10 @@ public class Turtle3D : TurtleLSystem { //dodanie obiektu kwiata z modeli Unity //kwiat K-kwiat, F gdzieś już jest zarezerwowane i pokazuje sie tylko łodyka dla wielkiego F turtleInterpretation.Add("K", (float[] args) => new Tuple(flower, Matrix4x4.Translate(new Vector3(0, 0, 0)) * Matrix4x4.Scale(new Vector3 (0.1f, 0.1f, 0.1f)))); + + // 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, 0, 0)) * Matrix4x4.Scale(new Vector3 (1, 1, 1)))); + 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)))); }