![]() That's exactly what the sky does as pycor goes up from the earth to the sky-top - it starts at blue and changes gradually to white. Except, in the model, earth-top is at pycor=0, so only the numbers from earth-top + 1 (1) to sky-top (17) are ever looked up, and so the resulting reported colors range from blue up through nearly white. ![]() That's exactly what we see in the model between the top of the earth and the top of the blue sky. ![]() ![]() In this case range1 is less than range2, so if pycor increased from -20 to 20, the resulting color would start at pycor = -20 with black, increase through darker shades till at pycor=0 we have pure blue, and then lighter tints of blue, and end up when pycor=20 at white. In other words this is going to look up colors for pycor ranging from 1 to 17. The model viewport has max-pycor set to 22, so sky-top defined as ( max-pycor - 5 ) would be 17. As we move upwards above the blue sky, where it transitions to white, outer-space starts at white, gets darker and darker, and finally becomes black. The genotype and phenotype each plant follows the following co-dominant gene expression patterns: WW - white flower WR or RW. Plants have two possible genes that determine their expression of flower color: W or R. That's exactly what we see in the model after hitting setup. Model was written in NetLogo 5.0.4 Viewed 336 times Downloaded 25 times Run 0 times. Therefore as pycor increases from 15 to 22 the resulting color will start at white, get darker and darker, and finally become black. The Modeling Commons contains more than 2,000 other NetLogo models, contributed by modelers around the world. We have the case where range2 is less than range1, so "the color scaling is inverted", ie the larger the number, the darker the shade of color. View, run, and discuss the 'Social Change Hamilton 1851-1861' model, written by Milton Friesen. But if range2 is less than range1, the color If range1 is less than range2, then the larger the number, the lighter The template is "scale-color color number range1 range2 " Your comment asks how scale-color is used in the climate-change model which has the following code: to setup-worldĪsk patches [ set colors for the different sections of the world Here's some to try: ask patches Īsk patches You can just open a new model and type some commands into the command line and see what you get. The number preceding those should be in that range! A number lower than that range will be set to the darkest share (black), and a number higher than that range will be displayed as the lightest shade ( white ). draw the rightmost column of patch labelsĪsk patches with [(pxcor = -2) and (pycor = 4Įnd Public Domain: To the extent possible under law, Uri Wilensky has waived all copyright and related or neighboring rights to this model.I believe those are the lower and upper limits of the numbers you might want converted into colors. ask patches set pcolor scale-color green lushness 0 100. So instead, we use the trick of using negative y coordinates: row 0 has a pycor of 0, row 1 has a pycor of -1, row 2 has a pycor of -2, and so on. GitHub - NetLogo-Mobile/Color-Picker NetLogo-Mobile / Color-Picker Public Notifications Fork 0 Star 0 Code Issues Pull requests Projects Security Insights main 2 branches 0 tags Go to file Code coloshword selecting words bug 299986b last week 19 commits dist setup for github pages last week src setup for github pages last week index. scale-color is a primitive that reports a shade of a color proportional to the value of a. Unfortunately there's no way to make pycor increase as we go down instead of up. The origin patch is (0,0) is located where the color 0 appears this helps keep the math relatively simple.
0 Comments
Leave a Reply. |