diff --git a/Main.jl b/Main.jl index fc33dfbf8155d7ac1883cd67a2900c54dfd63753..0d91b9ed950f705cf06487b6343cd6f3bee699de 100644 --- a/Main.jl +++ b/Main.jl @@ -69,12 +69,13 @@ Time = 0; NewF, Time = simulateField(F, 109, Time, 1000); Scene = GLScene(NewF[2]); -Soil = Rectangle(length = maximum([PlantDistance[i] * NPlants[i] + PlantDistance[i] for i in eachindex(SpeciesList)]), - width = sum([RowDistance[i] * (NRows[i]) for i in eachindex(SpeciesList)]) + RowDistance[last(SpeciesList)]) -rotatey!(Soil, pi/2) -VPL.translate!(Soil, Vec(0.0, (sum([RowDistance[i] * (NRows[i]) for i in eachindex(SpeciesList)]) + RowDistance[last(SpeciesList)]) / 2.0, 0.0)) -VPL.add!(Scene, mesh = Soil, color = RGB(1,1,0)) +NonRandomSpecies = SpeciesList[indexin(SpeciesList[[!RandomPlacement[X] for X in SpeciesList]], SpeciesList)] +Soil = Rectangle(length = maximum([PlantDistance[i] * NPlants[i] + PlantDistance[i] for i in eachindex(NonRandomSpecies)]), + width = sum([RowDistance[i] * (NRows[i]) for i in eachindex(NonRandomSpecies)]) + RowDistance[last(NonRandomSpecies)]); +rotatey!(Soil, pi/2); +VPL.translate!(Soil, Vec(0.0, (sum([RowDistance[i] * (NRows[i]) for i in eachindex(NonRandomSpecies)]) + RowDistance[last(NonRandomSpecies)]) / 2.0, 0.0)); +VPL.add!(Scene, mesh = Soil, color = RGB(1,1,0)); -writeFieldData(FB = NewF[1], Time = Time, Location = OutputLocation) +writeFieldData(FB = NewF[1], Time = Time, Location = OutputLocation); render(Scene, parallel = true)