Mendelian Inheritance in sunflowers
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This model simulates the sunflower inheritance patterns revealed by Cvejić et al. (2016) and Divita et al. (2012). Three characters are presented: floral color, inflorescence type, and disc color. Users may explore monohybrid and dihybrid crosses in sunflowers and apply the knowledge to create new purebred varieties.
HOW TO USE IT
- Choose one of seven cases, then press on the "Start/reset Simulation" button to confirm.
- Click on the "Press and choose flowers" button, you will be able to use the cursor to choose sunflower(s) from the simulation window.
- You may choose one sunflower to conduct self-pollination or choose two flowers to conduct cross-pollination (test cross).
- Examine offspring sunflower frequencies in the "Progeny" section.
HOW IT WORKS?
This model involves three genes: floral color (Y), inflorescence type (S), and disc color (C). Studies from Cvejić et al. (2016) and Divita et al. (2012) have suggested that the genes of floral color and inflorescence type are inherited independently. In this model, it is assumed that disc color is also inherited independently in relation to the floral color and inflorescence type. Also, this model only involves complete dominance.
Depending on the cases, a group of gametes containing the alleles of each of three genes are produced and then form sunflowers. The phenotypes of sunflowers are determined by their genotypes, which are in turn determined by the gamete genotypes. Therefore, the sunflowers you get at the beginning can be either heterozygous or homozygous. WHAT?!!! Yes, let's face this and keep two things in mind: 1) scientists do not just get purebred individuals automatically, and 2) they don't know which trait is dominant or recessive. They have to identify them! This model allows you to work like a scientist to figure out the dominance and recessiveness of floral color, inflorescence type, and disc color in sunflowers.
Yes, you need to conduct test crosses to collect data and figure them out. Once you choose one flower or two to conduct a test cross, the model will produce gametes based on the genotype(s) of the selected sunflower(s). For self-pollination, sperms and eggs will randomly fuse to form offspring sunflowers. For cross-pollination, the sperms and eggs of one parent sunflower will fuse with the sperms and eggs of the other parent sunflower. The total number of offspring sunflowers and the frequencies of different offspring phenotypes are presented in the "Progeny" section. Note you are unlikely to get the ratios that perfectly match the theoretical ones. This is what happens in reality and allows you to conduct further data analysis, such as the chi-square goodness of fit test.
Teaching suggestions
- Start with cases 1~3
- Allow students to work in groups
- Focus students on identifying phenotype types and ratios first. DO NOT just try to guess the genotypes.
- Let students collect numeric data to infer dominance and recessiveness. They must use data evidence to support their claims.
- Conduct a chi-square goodness of fit test if you use this model with AP biology or college students.
MODEL FAMILIES
This model is one of the NetLogo models we developed for teaching principles of genetics. Check other models for the multiallelic trait, codominance, and linkage at http://3dsciencemodeling.com
CREDITS
This model is made by Dr. Lin Xiang at the University of Kentucky in 2018 and revised in 2022. If you mention this model in a publication, we ask that you include the citations below.
Xiang, L. (2022). Mendelian inheritance in sunflowers. Department of STEM Education, University of Kentucky, Lexington, KY.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/.
REFERENCES
Cvejić, S., Jocić, S., & Mladenović, E. (2016). Inheritance of floral colour and type in four new inbred lines of ornamental sunflower (Helianthus annuus L.). The Journal of Horticultural Science and Biotechnology, 91(1), 30-35.
Divita, M. E., Salaberry, M. T., Echeverría, M. M., & Rodríguez, R. H. (2012, February). Genetic and environmental effects of some traits of ornamental value in sunflower (Helianthus annuus L.). In Proc. 18th Int. Sunflower Conf., Mar del Plata (pp. 566-574).
Comments and Questions
globals [x y p1 p2 population-size list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 f-x f-y flower-ID] ;p1=selected parent 1, p2=selected parent 2, turtles-own [parent c1 c2 c3 c4 genotype phenotype f-color inflorescence disc-flower] breed [gametes gamete] breed [flowers flower] breed [leaves a-leaf] breed [crosses cross] to setup ca set-ground set-gametes fertilization-1 set-leaves set-cross output-results set list-1 [] set list-2 [] set list-3 [] set list-4 [] set list-5 [] set list-6 [] set list-7 [] set list-8 [] reset-ticks end to gamete-trait set size 0.1 set color white set shape "dot" end to set-gametes ;produce gametes. These gametes are more randomized. create-gametes (50 + random 20) * 2 [gamete-trait if cases = "Case 1" [ ;monohybrid case 1--flower color set c1 item random 3 ["Y" "y" "y"] ;produce two alleles for gene Y. Produce more y than Y to deviate from ratio of 3:1 set c2 "s" set c3 "C" set genotype word c1 c2 set genotype word genotype c3] if cases = "Case 2" [ ;monohybrid case 2--Inflorescence set c1 "Y" set c2 item random 3 ["S" "s" "s"] ;produce two alleles for gene S. Produce more s than S to deviate from ratio of 3:1 set c3 "C" set genotype word c1 c2 set genotype word genotype c3] if cases = "Case 3" [ ;monohybrid case 3--disc-flower set c1 "y" set c2 "s" set c3 item random 3 ["C" "c" "c"] ;produce two alleles for gene C. Produce more c than C to deviate from ratio of 3:1 set genotype word c1 c2 set genotype word genotype c3] if cases = "Case 4" [ ;dihybrid--flower color and inflorescence set c1 item random 3 ["Y" "y" "y"] set c2 item random 3 ["S" "s" "s"] set c3 "C" set genotype word c1 c2 set genotype word genotype c3] if cases = "Case 5" [ ;dihybrid--disc-flower and inflorescence set c1 "y" set c2 item random 3 ["S" "s" "s"] set c3 item random 3 ["C" "c" "c"] set genotype word c1 c2 set genotype word genotype c3] if cases = "Case 6" [ ;dihybrid--flower color and disc-flower set c1 item random 3 ["Y" "y" "y"] set c2 "s" set c3 item random 3 ["C" "c" "c"] set genotype word c1 c2 set genotype word genotype c3] if cases = "Challenges" [ ;Challenges--cross get certain phenotypes set c1 item random 3 ["Y" "y" "y"] set c2 item random 3 ["S" "s" "s"] set c3 item random 3 ["C" "c" "c"] set genotype word c1 c2 set genotype word genotype c3] ] end to fertilization-1 ;Starting the P generation ask gametes [ let mate one-of other gametes if mate != nobody [hatch-flowers 1 [set genotype word genotype [genotype] of mate expression arrange-genotype set-position set size 0.8 set label "" ] ] ask mate [die] die] end to fertilization-2 ;both self-corss and test cross procedure ask gametes with [color = white] [ let mate one-of gametes with [color = black] if mate != nobody [hatch-flowers 1 [set genotype word genotype [genotype] of mate expression arrange-genotype set-position set size 0.8 set label "" ] ] ask mate [die] die] end to arrange-genotype set c1 item 0 genotype ;read 1st allele set c2 item 3 genotype ;read 4th allele set c1 word c1 c2 ;set the 1st pair of alleles if member? "yY" c1 [set c1 "Yy"] ;rearrange alleles set c2 item 1 genotype ;read 2nd allele set c3 item 4 genotype ;read 5th allele set c2 word c2 c3 ;set the 2nd pair of alleles if member? "sS" c2 [set c2 "Ss"] ;rearrange alleles set c3 item 2 genotype ;read 3rd allele set c4 item 5 genotype ;read 6th allele set c3 word c3 c4 ;set the 3rd pair of alleles if member? "cC" c3 [set c3 "Cc"] ;rearrange alleles set genotype word c1 c2 ;connect the three pairs of alleles set genotype word genotype c3 ;connect the three pairs of alleles end to expression ifelse member? "Y" genotype = true [set f-color "yellow" set color rgb 255 215 25 ] [set f-color "lemon-yellow" set color rgb 255 255 170 ] ifelse member? "S" genotype = true [set inflorescence "chrysanthemum-type" ifelse member? "C" genotype = true [set shape "sunflower" set disc-flower "purple-disc"][set shape "sunflower-0" set disc-flower "yellow-disc"]] [set inflorescence "normal-type" ifelse member? "C" genotype = true [set shape "sunflower-2" set disc-flower "purple-disc" ][set shape "sunflower-1" set disc-flower "yellow-disc"]] end to pick ;clear-output if mouse-inside? [ if mouse-down? [ set x round mouse-xcor set y round mouse-ycor let closest-patch patches with [pxcor = x and pycor = y] ask closest-patch [if any? flowers-here [ask one-of flowers-here [ifelse count flowers with [pxcor >= (max-pxcor - 1)] > 0 [setxy max-pxcor - 0.5 max-pycor - 2.5 set size 1.1] [setxy max-pxcor - 0.5 max-pycor - 0.5 set size 1.1] ] ] ] ]] if count flowers with [pxcor >= max-pxcor - 1] = 2 [ ;clean up the last generations when 2 parents are chosen let mom flowers with [ycor = max-pycor - 0.5] let dad flowers with [ycor = max-pycor - 2.5] set p1 [f-color] of mom ;set phenotype color inflorescence disc-flower set p1 word p1 " " set p1 word p1 [inflorescence] of mom set p1 word p1 " " set p1 word p1 [disc-flower] of mom set p2 [f-color] of dad ;set phenotype set p2 word p2 " " set p2 word p2 [inflorescence] of dad set p2 word p2 " " set p2 word p2 [disc-flower] of dad ask flowers with [pxcor < max-pxcor - 1 ] [die] ask gametes [die] stop ] end to gametogenesis-1 ;self-cross set population-size (8 + random 4) * 8 ;times 8 so no decimals are generated when producing different gametes let parent-1 one-of flowers with [xcor = max-pxcor - 0.5 and ycor = max-pycor - 0.5] ;must use one-of to show the genotype ;set sperms (ifelse ;set Y gene member? "YY" [genotype] of parent-1 = true [create-gametes population-size [set genotype "Y" gamete-trait]] member? "Yy" [genotype] of parent-1 = true [create-gametes population-size * 0.5 [set genotype "Y" gamete-trait ] create-gametes population-size * 0.5 [set genotype "y" gamete-trait ]] member? "yy" [genotype] of parent-1 = true [create-gametes population-size [set genotype "y" gamete-trait]]) (ifelse ;set S gene member? "SS" [genotype] of parent-1 = true [ask gametes [set genotype word genotype "S"]] member? "ss" [genotype] of parent-1 = true [ask gametes [set genotype word genotype "s"]] member? "Ss" [genotype] of parent-1 = true [ask n-of (count gametes with [genotype = "Y"] * 0.5 ) gametes with [genotype = "Y"][set genotype word genotype "S"] ;first get a half of "Y" and set them as "YS" ask gametes with [genotype = "Y"][set genotype word genotype "s"] ;get the rest "Y" and set them as "Ys" ask n-of (count gametes with [genotype = "y"] * 0.5 ) gametes with [genotype = "y"][set genotype word genotype "S"] ;first get a half of "y" and set them as "yS" ask gametes with [genotype = "y"][set genotype word genotype "s"]] ) ;get the rest "y" and set them as "ys" (ifelse ;set C gene member? "CC" [genotype] of parent-1 = true [ask gametes [set genotype word genotype "C"]] member? "cc" [genotype] of parent-1 = true [ask gametes [set genotype word genotype "c"]] member? "Cc" [genotype] of parent-1 = true [ask n-of (count gametes with [genotype = "YS"] * 0.5 ) gametes with [genotype = "YS"][set genotype word genotype "C"] ;first get a half of "YS" and set them as "YSC" ask gametes with [genotype = "YS"][set genotype word genotype "c"] ;;get the rest "YS" and set them as "YSc" ask n-of (count gametes with [genotype = "Ys"] * 0.5 ) gametes with [genotype = "Ys"][set genotype word genotype "C"] ;first get a half of "Ys" and set them as "YsC" ask gametes with [genotype = "Ys"][set genotype word genotype "c"] ;;get the rest "Ys" and set them as "Ysc" ask n-of (count gametes with [genotype = "yS"] * 0.5 ) gametes with [genotype = "yS"][set genotype word genotype "C"] ;first get a half of "yS" and set them as "ySC" ask gametes with [genotype = "yS"][set genotype word genotype "c"] ;;get the rest "yS" and set them as "ySc" ask n-of (count gametes with [genotype = "ys"] * 0.5 ) gametes with [genotype = "ys"][set genotype word genotype "C"] ;first get a half of "ys" and set them as "ysC" ask gametes with [genotype = "ys"][set genotype word genotype "c"]]) ;;get the rest "yS" and set them as "ysc" ;set eggs (ifelse ;set Y gene member? "YY" [genotype] of parent-1 = true [create-gametes population-size [set genotype "Y" gamete-trait set color black]] member? "Yy" [genotype] of parent-1 = true [create-gametes population-size * 0.5 [set genotype "Y" gamete-trait set color black] create-gametes population-size * 0.5 [set genotype "y" gamete-trait set color black]] member? "yy" [genotype] of parent-1 = true [create-gametes population-size [set genotype "y" gamete-trait set color black]]) (ifelse ;set S gene member? "SS" [genotype] of parent-1 = true [ask gametes with [color = black] [set genotype word genotype "S"]] member? "ss" [genotype] of parent-1 = true [ask gametes with [color = black] [set genotype word genotype "s"]] member? "Ss" [genotype] of parent-1 = true [ask n-of (count gametes with [genotype = "Y" and color = black] * 0.5 ) gametes with [genotype = "Y" and color = black][set genotype word genotype "S"] ;first get a half of "Y" and set them as "YS" ask gametes with [genotype = "Y" and color = black][set genotype word genotype "s"] ;get the rest "Y" and set them as "Ys" ask n-of (count gametes with [genotype = "y" and color = black] * 0.5 ) gametes with [genotype = "y" and color = black][set genotype word genotype "S"] ;first get a half of "y" and set them as "yS" ask gametes with [genotype = "y" and color = black][set genotype word genotype "s"]] ) ;get the rest "y" and set them as "ys" (ifelse ;set C gene member? "CC" [genotype] of parent-1 = true [ask gametes with [color = black] [set genotype word genotype "C"]] member? "cc" [genotype] of parent-1 = true [ask gametes with [color = black] [set genotype word genotype "c"]] member? "Cc" [genotype] of parent-1 = true [ask n-of (count gametes with [genotype = "YS" and color = black] * 0.5 ) gametes with [genotype = "YS" and color = black][set genotype word genotype "C"] ;first get a half of "YS" and set them as "YSC" ask gametes with [genotype = "YS" and color = black][set genotype word genotype "c"] ;;get the rest "YS" and set them as "YSc" ask n-of (count gametes with [genotype = "Ys" and color = black] * 0.5 ) gametes with [genotype = "Ys" and color = black][set genotype word genotype "C"] ;first get a half of "Ys" and set them as "YsC" ask gametes with [genotype = "Ys" and color = black][set genotype word genotype "c"] ;;get the rest "Ys" and set them as "Ysc" ask n-of (count gametes with [genotype = "yS" and color = black] * 0.5 ) gametes with [genotype = "yS" and color = black][set genotype word genotype "C"] ;first get a half of "yS" and set them as "ySC" ask gametes with [genotype = "yS" and color = black][set genotype word genotype "c"] ;;get the rest "yS" and set them as "ySc" ask n-of (count gametes with [genotype = "ys" and color = black] * 0.5 ) gametes with [genotype = "ys" and color = black][set genotype word genotype "C"] ;first get a half of "ys" and set them as "ysC" ask gametes with [genotype = "ys" and color = black][set genotype word genotype "c"]]) ;;get the rest "yS" and set them as "ysc" ask flowers [die] end to gametogenesis-2 ;test cross set population-size (8 + random 4) * 8 ;times 8 so no decimals are generated when producing different gametes let mom one-of flowers with [xcor = max-pxcor - 0.5 and ycor = max-pycor - 0.5] ;must use one-of to show the genotype let dad one-of flowers with [xcor = max-pxcor - 0.5 and ycor = max-pycor - 2.5] ;must use one-of to show the genotype ;set eggs (ifelse ;set Y gene member? "YY" [genotype] of mom = true [create-gametes population-size [set genotype "Y" gamete-trait]] member? "Yy" [genotype] of mom = true [create-gametes population-size * 0.5 [set genotype "Y" gamete-trait ] create-gametes population-size * 0.5 [set genotype "y" gamete-trait ]] member? "yy" [genotype] of mom = true [create-gametes population-size [set genotype "y" gamete-trait]]) (ifelse ;set S gene member? "SS" [genotype] of mom = true [ask gametes [set genotype word genotype "S"]] member? "ss" [genotype] of mom = true [ask gametes [set genotype word genotype "s"]] member? "Ss" [genotype] of mom = true [ask n-of (count gametes with [genotype = "Y"] * 0.5 ) gametes with [genotype = "Y"][set genotype word genotype "S"] ;first get a half of "Y" and set them as "YS" ask gametes with [genotype = "Y"][set genotype word genotype "s"] ;get the rest "Y" and set them as "Ys" ask n-of (count gametes with [genotype = "y"] * 0.5 ) gametes with [genotype = "y"][set genotype word genotype "S"] ;first get a half of "y" and set them as "yS" ask gametes with [genotype = "y"][set genotype word genotype "s"]] ) ;get the rest "y" and set them as "ys" (ifelse ;set C gene member? "CC" [genotype] of mom = true [ask gametes [set genotype word genotype "C"]] member? "cc" [genotype] of mom = true [ask gametes [set genotype word genotype "c"]] member? "Cc" [genotype] of mom = true [ask n-of (count gametes with [genotype = "YS"] * 0.5 ) gametes with [genotype = "YS"][set genotype word genotype "C"] ;first get a half of "YS" and set them as "YSC" ask gametes with [genotype = "YS"][set genotype word genotype "c"] ;;get the rest "YS" and set them as "YSc" ask n-of (count gametes with [genotype = "Ys"] * 0.5 ) gametes with [genotype = "Ys"][set genotype word genotype "C"] ;first get a half of "Ys" and set them as "YsC" ask gametes with [genotype = "Ys"][set genotype word genotype "c"] ;;get the rest "Ys" and set them as "Ysc" ask n-of (count gametes with [genotype = "yS"] * 0.5 ) gametes with [genotype = "yS"][set genotype word genotype "C"] ;first get a half of "yS" and set them as "ySC" ask gametes with [genotype = "yS"][set genotype word genotype "c"] ;;get the rest "yS" and set them as "ySc" ask n-of (count gametes with [genotype = "ys"] * 0.5 ) gametes with [genotype = "ys"][set genotype word genotype "C"] ;first get a half of "ys" and set them as "ysC" ask gametes with [genotype = "ys"][set genotype word genotype "c"]]) ;;get the rest "yS" and set them as "ysc" ;set sperms (ifelse ;set Y gene member? "YY" [genotype] of dad = true [create-gametes population-size [set genotype "Y" gamete-trait set color black]] member? "Yy" [genotype] of dad = true [create-gametes population-size * 0.5 [set genotype "Y" gamete-trait set color black] create-gametes population-size * 0.5 [set genotype "y" gamete-trait set color black]] member? "yy" [genotype] of dad = true [create-gametes population-size [set genotype "y" gamete-trait set color black]]) (ifelse ;set S gene member? "SS" [genotype] of dad = true [ask gametes with [color = black] [set genotype word genotype "S"]] member? "ss" [genotype] of dad = true [ask gametes with [color = black] [set genotype word genotype "s"]] member? "Ss" [genotype] of dad = true [ask n-of (count gametes with [genotype = "Y" and color = black] * 0.5 ) gametes with [genotype = "Y" and color = black][set genotype word genotype "S"] ;first get a half of "Y" and set them as "YS" ask gametes with [genotype = "Y" and color = black][set genotype word genotype "s"] ;get the rest "Y" and set them as "Ys" ask n-of (count gametes with [genotype = "y" and color = black] * 0.5 ) gametes with [genotype = "y" and color = black][set genotype word genotype "S"] ;first get a half of "y" and set them as "yS" ask gametes with [genotype = "y" and color = black][set genotype word genotype "s"]] ) ;get the rest "y" and set them as "ys" (ifelse ;set C gene member? "CC" [genotype] of dad = true [ask gametes with [color = black] [set genotype word genotype "C"]] member? "cc" [genotype] of dad = true [ask gametes with [color = black] [set genotype word genotype "c"]] member? "Cc" [genotype] of dad = true [ask n-of (count gametes with [genotype = "YS" and color = black] * 0.5 ) gametes with [genotype = "YS" and color = black][set genotype word genotype "C"] ;first get a half of "YS" and set them as "YSC" ask gametes with [genotype = "YS" and color = black][set genotype word genotype "c"] ;;get the rest "YS" and set them as "YSc" ask n-of (count gametes with [genotype = "Ys" and color = black] * 0.5 ) gametes with [genotype = "Ys" and color = black][set genotype word genotype "C"] ;first get a half of "Ys" and set them as "YsC" ask gametes with [genotype = "Ys" and color = black][set genotype word genotype "c"] ;;get the rest "Ys" and set them as "Ysc" ask n-of (count gametes with [genotype = "yS" and color = black] * 0.5 ) gametes with [genotype = "yS" and color = black][set genotype word genotype "C"] ;first get a half of "yS" and set them as "ySC" ask gametes with [genotype = "yS" and color = black][set genotype word genotype "c"] ;;get the rest "yS" and set them as "ySc" ask n-of (count gametes with [genotype = "ys" and color = black] * 0.5 ) gametes with [genotype = "ys" and color = black][set genotype word genotype "C"] ;first get a half of "ys" and set them as "ysC" ask gametes with [genotype = "ys" and color = black][set genotype word genotype "c"]]) ;;get the rest "yS" and set them as "ysc" ask mom [die] ask dad [die] end to set-lists if any? flowers with [xcor <= 12][ (ifelse cases = "Case 1" [ set list-1 [who] of flowers with [f-color = "yellow" and xcor < max-pxcor - 1] set list-2 [who] of flowers with [f-color = "lemon-yellow" and xcor < max-pxcor - 1] set list-1 sentence list-1 list-2 sorting ] cases = "Case 2" [ set list-1 [who] of flowers with [inflorescence = "normal-type" and xcor < max-pxcor - 1] set list-2 [who] of flowers with [inflorescence = "chrysanthemum-type" and xcor < max-pxcor - 1] set list-1 sentence list-1 list-2 sorting ] cases = "Case 3" [ set list-1 [who] of flowers with [disc-flower = "purple-disc" and xcor < max-pxcor - 1] set list-2 [who] of flowers with [disc-flower = "yellow-disc" and xcor < max-pxcor - 1] set list-1 sentence list-1 list-2 sorting ] cases = "Case 4" [ set list-1 [who] of flowers with [f-color = "yellow" and inflorescence = "normal-type" and xcor < max-pxcor - 1] set list-2 [who] of flowers with [f-color = "lemon-yellow" and inflorescence = "normal-type" and xcor < max-pxcor - 1] set list-1 sentence list-1 list-2 set list-3 [who] of flowers with [f-color = "yellow" and inflorescence = "chrysanthemum-type" and xcor < max-pxcor - 1] set list-4 [who] of flowers with [f-color = "lemon-yellow" and inflorescence = "chrysanthemum-type" and xcor < max-pxcor - 1] set list-3 sentence list-3 list-4 set list-1 sentence list-1 list-3 sorting ] cases = "Case 5" [ set list-1 [who] of flowers with [disc-flower = "purple-disc" and inflorescence = "normal-type" and xcor < max-pxcor - 1] set list-2 [who] of flowers with [disc-flower = "yellow-disc" and inflorescence = "normal-type" and xcor < max-pxcor - 1] set list-1 sentence list-1 list-2 set list-3 [who] of flowers with [disc-flower = "purple-disc" and inflorescence = "chrysanthemum-type" and xcor < max-pxcor - 1] set list-4 [who] of flowers with [disc-flower = "yellow-disc" and inflorescence = "chrysanthemum-type" and xcor < max-pxcor - 1] set list-3 sentence list-3 list-4 set list-1 sentence list-1 list-3 sorting ] cases = "Case 6" [ set list-1 [who] of flowers with [disc-flower = "purple-disc" and f-color = "yellow" and xcor < max-pxcor - 1] set list-2 [who] of flowers with [disc-flower = "yellow-disc" and f-color = "yellow" and xcor < max-pxcor - 1] set list-1 sentence list-1 list-2 set list-3 [who] of flowers with [disc-flower = "purple-disc" and f-color = "lemon-yellow" and xcor < max-pxcor - 1] set list-4 [who] of flowers with [disc-flower = "yellow-disc" and f-color = "lemon-yellow" and xcor < max-pxcor - 1] set list-3 sentence list-3 list-4 set list-1 sentence list-1 list-3 sorting ] cases = "Challenges" [ set list-1 [who] of flowers with [f-color = "yellow" and inflorescence = "normal-type" and disc-flower = "purple-disc" and xcor < max-pxcor - 1] set list-2 [who] of flowers with [f-color = "yellow" and inflorescence = "normal-type" and disc-flower = "yellow-disc" and xcor < max-pxcor - 1] set list-1 sentence list-1 list-2 set list-3 [who] of flowers with [f-color = "yellow" and inflorescence = "chrysanthemum-type" and disc-flower = "purple-disc" and xcor < max-pxcor - 1] set list-4 [who] of flowers with [f-color = "yellow" and inflorescence = "chrysanthemum-type" and disc-flower = "yellow-disc" and xcor < max-pxcor - 1] set list-3 sentence list-3 list-4 set list-1 sentence list-1 list-3 set list-5 [who] of flowers with [f-color = "lemon-yellow" and inflorescence = "normal-type" and disc-flower = "purple-disc" and xcor < max-pxcor - 1] set list-6 [who] of flowers with [f-color = "lemon-yellow" and inflorescence = "normal-type" and disc-flower = "yellow-disc" and xcor < max-pxcor - 1] set list-5 sentence list-5 list-6 set list-7 [who] of flowers with [f-color = "lemon-yellow" and inflorescence = "chrysanthemum-type" and disc-flower = "purple-disc" and xcor < max-pxcor - 1] set list-8 [who] of flowers with [f-color = "lemon-yellow" and inflorescence = "chrysanthemum-type" and disc-flower = "yellow-disc" and xcor < max-pxcor - 1] set list-7 sentence list-7 list-8 set list-5 sentence list-5 list-7 set list-1 sentence list-1 list-5 sorting ] ) ] end to sorting set f-x 0 set f-y max-pycor set flower-ID 0 repeat length list-1 [ask flowers with [who = item flower-ID list-1] [setxy f-x f-y] ifelse f-y > 0 [set f-y f-y - 1][set f-y max-pycor set f-x f-x + 1] set flower-ID flower-ID + 1 ] end to output-results (ifelse cases = "Case 1" [ output-print "Use case 1 to explore the inheritance patterns of ray flower color." ] cases = "Case 2" [ output-print "Use case 2 to explore the inheritance patterns of inflorescence type." ] cases = "Case 3" [ output-print "Use case 3 to explore the inheritance patterns of disc color." output-print "" ] cases = "Case 4" [ output-print "Use case 4 to explore the inheritance patterns between ray flower color and inflorescence type." ] cases = "Case 5" [ output-print "Use case 5 to explore the inheritance patterns between inflorescence type and disc color." ] cases = "Case 6" [ output-print "Use case 6 to explore the inheritance patterns between ray flower color and disc color." ] cases = "Challenges" [ output-print "Challege 1: Create a purebred 'Teddy bear' variety--yellow color, chrysanthemum-type inflorescence, and yellow disc. " output-print "Challege 2: Create a purebred 'White Nite' variety--light yellow color, normal-type inflorescence, and purple disc." ] ) end to set-cross create-crosses 1 [set size 1.2 set color 49 set shape "square-1" setxy max-pxcor - 0.5 max-pycor - .5] create-crosses 1 [set size 0.5 set color 49 set shape "x" setxy max-pxcor - 0.5 max-pycor - 1.5] create-crosses 1 [set size 1.2 set color 49 set shape "square-1" setxy max-pxcor - 0.5 max-pycor - 2.5] end to set-ground ask patches [set pcolor 52.5 + random-float 0.5] ask patches with [pxcor >= max-pxcor - 1] [set pcolor 0] end to set-leaves create-leaves 7 + random 4 [ set shape "stem-2" setxy max-pxcor - random-float 1.2 0.2 + min-pycor + random-float 2.5 set size 1.5 - [ycor] of self * 0.2 set color 55 - ([ycor] of self) * 0.75 ] end to set-position setxy random (max-pxcor - 1) random (max-pycor + 1) if any? other flowers-here [set-position] end
There are 16 versions of this model.
This model does not have any ancestors.
This model does not have any descendants.