-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Describe the bug
First issue : when rendering a field in a 2D display, it changes the values of cells {0,0} and {1,0} to reflect min and max (sort of meta-data) of init field (or the very first changes) - and then those cells do not change anymore. Turning the display to 3D solve the problem. Also if you have a 2D and a 3D display, those 2 cells are the same in BOTH displays, meaning it mess up directly with field values.
Second issue : when rendering a field in a 2D display, it seems that cells with max x and max y (i.e. in the display the bottom line and the column at the right) are not properly rendered
To Reproduce
Steps to reproduce the behavior:
Run the model at the bottom of the issue
Expected behavior
Mesh should not mess up with fields
Screenshots
See a random experiments :
Desktop (please complete the following information):
- OS: macOS Monterey (also on windows 11)
- PC Model: Apple M1
- GAMA version: 1.9.1
- Java version: JDK embedded
- Graphics cards / Display system:
Additional context
The model I use to generate screenshots:
model NewModel
global {
field f <- field(100,100);
init {
do upfield( range(100) collect ({rnd(100),rnd(100)}) , 10);
}
reflex flex {
do upfield( range(5) collect ({rnd(100),rnd(100)}) , 10);
}
action upfield(list<point> c, int up) { loop xy over:c { f[xy] <- f[xy] + up; } }
}
experiment xp type:gui {
output {
display main type:3d {
mesh f scale:0.0 color:palette([#black, #green, #yellow, #pink]);
}
display main type:2d {
mesh f scale:0.0 color:palette([#black, #green, #yellow, #pink]);
}
}
}
