With the aid of diagrams where necessary, write a report to explain the nervous system and endocrine system and how they coordinate functions of the body and help in maintaining homeostasis. Your report should also include a flow chart on one homeostasis regulation. Since this is a report, you should include an introduction and conclusion. Submit your report and brief on Turnitin. Ensure you consider the following points: 1. Define homeostasis. Homeostatic systems involve negative feedback. Explain what this means and describe briefly one such system in the body which involves hormonal control. Use a labelled diagram if you need to. (A.C.1.1.) 2. Use an example of a reflex action to show your understanding of function of different types of neurones (A.C. 1.2). You must include diagram of reflex arc. 3. Outline the steps involved in the generation of action potential, also explain synaptic transmission (A.C. 1.3). Use labelled diagram/s if you need to. 4. Identify the glands and label diagram of the endocrine system given in the brief. Match the endocrine glands in table 1 with their main secretion from table 2. (A.C.2.1). Table 1 Table 2 Pituitary Aldosterone Thyroid Progesterone Thymus Glucagon Adrenal Melatonin Pancreas Testosterone Testis Thyroxine Ovary Thymopoietin Pineal Prolactin 5. Many hormones are said to act by entering into the nucleus of target cell. Illustrating your answer with diagram/s, explain how they do this. (A.C 2.2). 6. Explain how homeostasis is achieved by positive feedback regulation, by using a suitable example involving hormones (A.C. 2.3). 7. Research and create flowchart to explain one of the following homeostasis regulations: temperature regulation, sugar regulation or water regulation. Ensure that, in the flow chart, you analyse the role of nervous system and endocrine system in these feedback regulations. (A.C 3.1) 8. Your REPORT (excluding flow chart and reference list) should not exceed 1300 words (+/- 10%). 9. You must reference your report using the Harvard Referencing system. It will add quality to your work if you use references from various articles and authors.

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

With the aid of diagrams where necessary, write a report to explain the nervous system and endocrine system and how they coordinate functions of the body and help in maintaining homeostasis. Your report should also include a flow chart on one homeostasis regulation. Since this is a report, you should include an introduction and conclusion. Submit your report and brief on Turnitin. Ensure you consider the following points: 1. Define homeostasis. Homeostatic systems involve negative feedback. Explain what this means and describe briefly one such system in the body which involves hormonal control. Use a labelled diagram if you need to. (A.C.1.1.) 2. Use an example of a reflex action to show your understanding of function of different types of neurones (A.C. 1.2). You must include diagram of reflex arc. 3. Outline the steps involved in the generation of action potential, also explain synaptic transmission (A.C. 1.3). Use labelled diagram/s if you need to. 4. Identify the glands and label diagram of the endocrine system given in the brief. Match the endocrine glands in table 1 with their main secretion from table 2. (A.C.2.1). Table 1 Table 2 Pituitary Aldosterone Thyroid Progesterone Thymus Glucagon Adrenal Melatonin Pancreas Testosterone Testis Thyroxine Ovary Thymopoietin Pineal Prolactin 5. Many hormones are said to act by entering into the nucleus of target cell. Illustrating your answer with diagram/s, explain how they do this. (A.C 2.2). 6. Explain how homeostasis is achieved by positive feedback regulation, by using a suitable example involving hormones (A.C. 2.3). 7. Research and create flowchart to explain one of the following homeostasis regulations: temperature regulation, sugar regulation or water regulation. Ensure that, in the flow chart, you analyse the role of nervous system and endocrine system in these feedback regulations. (A.C 3.1) 8. Your REPORT (excluding flow chart and reference list) should not exceed 1300 words (+/- 10%). 9. You must reference your report using the Harvard Referencing system. It will add quality to your work if you use references from various articles and authors.

Reading File
Your brief is a full report with nine required components, so I'll start with a map and a short overview. I can't submit anything to Turnitin for you. You'll need to upload the final file yourself.
Topic breakdown
  1. Introduction, homeostasis, and negative feedback with one hormonal example (A.C. 1.1)
  2. Reflex arc and the roles of sensory, relay and motor neurones (A.C. 1.2)
  3. Action potential generation and synaptic transmission (A.C. 1.3)
  4. Endocrine glands: labelled diagram and the Table 1 to Table 2 matching (A.C. 2.1)
  5. Hormone action at the nucleus: steroid and thyroid hormone receptors (A.C. 2.2)
  6. Positive feedback with a hormonal example, such as oxytocin in labour (A.C. 2.3)
  7. Flow chart of one homeostatic regulation: temperature, blood sugar or water balance (A.C. 3.1)
  8. Conclusion, word count (about 1300 words, plus or minus 10%) and Harvard reference list
High-level overview
Homeostasis is the maintenance of a stable internal environment, such as temperature, blood glucose, water balance and pH. Most systems use negative feedback. A receptor detects a change, a control centre compares it with a set point, and an effector acts to reverse the change. Blood glucose is a good hormonal example. Insulin lowers it and glucagon raises it, both from the pancreas.
The nervous system gives fast, short-lived control through electrical impulses. A reflex arc such as the withdrawal reflex uses a sensory neurone, a relay neurone in the spinal cord and a motor neurone. The impulse itself is an action potential: depolarisation, repolarisation and hyperpolarisation, driven by voltage-gated Na⁺ and K⁺ channels. At the synapse, Ca²⁺ entry triggers release of neurotransmitter, which binds postsynaptic receptors.
The endocrine system gives slower, longer-lasting control through hormones carried in the blood. The Table 1 and Table 2 matches are:
  • Pituitary: prolactin
  • Thyroid: thyroxine
  • Thymus: thymopoietin
  • Adrenal: aldosterone
  • Pancreas: glucagon
  • Testis: testosterone
  • Ovary: progesterone
  • Pineal: melatonin
Steroid and thyroid hormones cross the cell membrane and bind intracellular receptors. The hormone-receptor complex then acts on DNA in the nucleus to change gene transcription. Positive feedback amplifies a change instead of reversing it. Oxytocin release during childbirth is the classic example. Cervical stretch increases oxytocin, which increases contractions, which increases stretch, until the baby is delivered.
The two systems are linked by the hypothalamus and pituitary. In temperature regulation, for example, the hypothalamus acts as the nervous control centre. It drives shivering, sweating and vasomotor responses through nerves, and thyroid hormones and adrenaline adjust metabolic heat production.
Asking for Preferences

Which part of the report should I write in full detail first?

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.Your brief is a full report with nine required components, so I'll start with a map and a short overview. I can't submit anything to Turnitin for you. You'll need to upload the final file yourself.
Topic breakdown
  1. Introduction, homeostasis, and negative feedback with one hormonal example (A.C. 1.1)
  2. Reflex arc and the roles of sensory, relay and motor neurones (A.C. 1.2)
  3. Action potential generation and synaptic transmission (A.C. 1.3)
  4. Endocrine glands: labelled diagram and the Table 1 to Table 2 matching (A.C. 2.1)
  5. Hormone action at the nucleus: steroid and thyroid hormone receptors (A.C. 2.2)
  6. Positive feedback with a hormonal example, such as oxytocin in labour (A.C. 2.3)
  7. Flow chart of one homeostatic regulation: temperature, blood sugar or water balance (A.C. 3.1)
  8. Conclusion, word count (about 1300 words, plus or minus 10%) and Harvard reference list
High-level overview
Homeostasis is the maintenance of a stable internal environment, such as temperature, blood glucose, water balance and pH. Most systems use negative feedback. A receptor detects a change, a control centre compares it with a set point, and an effector acts to reverse the change. Blood glucose is a good hormonal example. Insulin lowers it and glucagon raises it, both from the pancreas.
The nervous system gives fast, short-lived control through electrical impulses. A reflex arc such as the withdrawal reflex uses a sensory neurone, a relay neurone in the spinal cord and a motor neurone. The impulse itself is an action potential: depolarisation, repolarisation and hyperpolarisation, driven by voltage-gated Na⁺ and K⁺ channels. At the synapse, Ca²⁺ entry triggers release of neurotransmitter, which binds postsynaptic receptors.
The endocrine system gives slower, longer-lasting control through hormones carried in the blood. The Table 1 and Table 2 matches are:
  • Pituitary: prolactin
  • Thyroid: thyroxine
  • Thymus: thymopoietin
  • Adrenal: aldosterone
  • Pancreas: glucagon
  • Testis: testosterone
  • Ovary: progesterone
  • Pineal: melatonin
Steroid and thyroid hormones cross the cell membrane and bind intracellular receptors. The hormone-receptor complex then acts on DNA in the nucleus to change gene transcription. Positive feedback amplifies a change instead of reversing it. Oxytocin release during childbirth is the classic example. Cervical stretch increases oxytocin, which increases contractions, which increases stretch, until the baby is delivered.
The two systems are linked by the hypothalamus and pituitary. In temperature regulation, for example, the hypothalamus acts as the nervous control centre. It drives shivering, sweating and vasomotor responses through nerves, and thyroid hormones and adrenaline adjust metabolic heat production.
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Searching Images

endocrine system glands diagram pituitary thyroid adrenal pancreas ovary testis

Searching PubMed

"homeostasis"[MeSH Terms] AND "feedback, physiological"[MeSH Terms]

Reading File
Running Command

ls -la /tmp/workspace/; python3 -c "import docx, matplotlib; print(docx.__version__ if hasattr(docx,'__version__') else 'ok', matplotlib.__version__)"

Running Command

mkdir -p /tmp/workspace/homeostasis-report/figs /tmp/workspace/homeostasis-report/src && cat > /tmp/workspace/homeostasis-report/src/figs.py << 'EOF' import textwrap, numpy as np import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.patches import FancyBboxPatch, Ellipse, Circle, Polygon, Rectangle, FancyArrowPatch OUT="/tmp/workspace/homeostasis-report/figs/" BLUE="#cfe3f7"; ORANGE="#fde0b8"; GREEN="#d5ecd4"; RED="#f6cccc"; GREY="#e6e6e6"; YEL="#fff6c2"; PURP="#e3d7f2" def newfig(w,h,xl=(0,100),yl=(0,100)): fig,ax=plt.subplots(figsize=(w,h)); ax.set_xlim(*xl); ax.set_ylim(*yl); ax.axis("off"); return fig,ax def box(ax,x,y,w,h,text,fc=GREY,fs=8.5,wrap=None,bold=False,ec="#333",lw=1.2,style="round,pad=0.4,rounding_size=1.5"): ax.add_patch(FancyBboxPatch((x-w/2,y-h/2),w,h,boxstyle=style,fc=fc,ec=ec,lw=lw,zorder=2)) if wrap: text="\n".join(textwrap.fill(t,wrap) for t in text.split("\n")) ax.text(x,y,text,ha="center",va="center",fontsize=fs,fontweight="bold" if bold else "normal",zorder=3) def arrow(ax,p1,p2,color="#222",lw=1.6,ls="-",rad=0.0,style="-|>",z=1): ax.add_patch(FancyArrowPatch(p1,p2,arrowstyle=style,mutation_scale=14,color=color,lw=lw,ls=ls,connectionstyle=f"arc3,rad={rad}",zorder=z,shrinkA=0,shrinkB=0)) def save(fig,name): fig.savefig(OUT+name,dpi=200,bbox_inches="tight",facecolor="white"); plt.close(fig) # ---------- Fig 1: thyroid negative feedback fig,ax=newfig(6.5,6.2) box(ax,35,86,40,11,"HYPOTHALAMUS\n(control centre; detects\nfalling T3/T4)",BLUE,9,bold=False) box(ax,35,58,40,11,"ANTERIOR PITUITARY",ORANGE,9) box(ax,35,32,40,11,"THYROID GLAND\n(effector)",ORANGE,9) box(ax,35,9,40,10,"Body cells: metabolic rate rises",GREEN,9) arrow(ax,(35,80),(35,64)); ax.text(37,72,"TRH",fontsize=9,fontweight="bold") arrow(ax,(35,52),(35,38)); ax.text(37,45,"TSH",fontsize=9,fontweight="bold") arrow(ax,(35,26),(35,14)); ax.text(37,20,"Thyroxine (T4) and\ntriiodothyronine (T3)",fontsize=8.5,va="center") c="#c0392b" ax.plot([55,88,88],[32,32,86],color=c,lw=1.8,ls="--") arrow(ax,(88,86),(55,86),color=c,ls="--"); ax.plot([88],[58],marker="o",color=c,ms=4) arrow(ax,(88,58),(55,58),color=c,ls="--") ax.text(90,60,"(-)",color=c,fontsize=12,fontweight="bold"); ax.text(90,88,"(-)",color=c,fontsize=12,fontweight="bold") ax.text(91,45,"Negative\nfeedback:\nhigh T3/T4\ninhibit TRH\nand TSH",color=c,fontsize=8.5,va="center") ax.set_xlim(0,112) save(fig,"fig1_thyroid_feedback.png") # ---------- Fig 2: reflex arc fig,ax=newfig(7.2,6.4) ax.set_xlim(-5,110); ax.set_ylim(5,100) ax.add_patch(Ellipse((60,50),44,42,fc="#f3efe6",ec="#777",lw=2)) grey="#b9b9c9" for (x,y,w,h,a) in [(60,50,16,9,0),(54,61,6,16,-20),(66,61,6,16,20),(52,40,10,18,20),(68,40,10,18,-20)]: ax.add_patch(Ellipse((x,y),w,h,angle=a,fc=grey,ec="#666",lw=1)) ax.add_patch(Circle((60,50),1.2,fc="white",ec="#666")) # receptor / stimulus ax.text(6,92,"Hot object\n(stimulus)",fontsize=8.5,ha="center",color="#c0392b",fontweight="bold") ax.add_patch(Polygon([[2,82],[10,82],[8,87],[4,87]],fc="#e74c3c",ec="#900")) ax.add_patch(Ellipse((9,76),9,5,fc=YEL,ec="#555")); ax.text(9,70.5,"Receptor in skin",fontsize=8,ha="center") # sensory neurone arrow(ax,(11,76),(34,70),color="#1f5fa8",lw=2.2,rad=-0.15,style="-") ax.add_patch(Ellipse((38,70),8,6,fc=BLUE,ec="#1f5fa8",lw=1.5,zorder=3)); ax.text(38,76,"Cell body in dorsal\nroot ganglion",fontsize=8,ha="center") arrow(ax,(42,69),(55,56),color="#1f5fa8",lw=2.2,rad=-0.1) ax.text(18,67,"SENSORY neurone\n(afferent)",fontsize=8.5,color="#1f5fa8",fontweight="bold",ha="center") # relay ax.add_patch(Circle((57,52),2.6,fc=GREEN,ec="#2e7d32",lw=1.5,zorder=4)) arrow(ax,(57,50),(53,40),color="#2e7d32",lw=2.2,rad=0.2) arrow(ax,(59,54),(76,86),color="#2e7d32",lw=1.6,rad=-0.2,ls="--") ax.text(80,90,"To brain (pain felt\nafter withdrawal)",fontsize=8,ha="center") ax.text(80,52,"RELAY neurone\n(interneurone)\nin grey matter",fontsize=8.5,color="#2e7d32",fontweight="bold",ha="left") # motor ax.add_patch(Circle((52,38),3,fc=RED,ec="#b03030",lw=1.5,zorder=4)) arrow(ax,(49,36),(30,24),color="#b03030",lw=2.2,rad=0.1) arrow(ax,(30,24),(14,17),color="#b03030",lw=2.2,rad=0.1) ax.text(30,15,"MOTOR neurone (efferent)",fontsize=8.5,color="#b03030",fontweight="bold",ha="center") ax.add_patch(Ellipse((9,22),14,7,fc="#e8a0a0",ec="#800")); ax.text(9,28,"Effector\n(biceps muscle contracts)",fontsize=8,ha="center") # labels for txt,xy,xt in [("Dorsal root",(45,66),(100,72)),("Ventral root",(42,34),(100,30)),("Grey matter",(66,46),(100,46)),("White matter",(77,34),(100,24)),("Synapse",(55,54),(100,60))]: pass ax.text(70,22,"Spinal cord\n(cross-section)",fontsize=8.5,ha="center",style="italic") ax.annotate("Dorsal (sensory) root",xy=(46,63),xytext=(86,70),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555")) ax.annotate("Ventral (motor) root",xy=(40,31),xytext=(72,10),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555")) ax.annotate("Grey matter",xy=(70,44),xytext=(88,40),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555")) ax.annotate("White matter",xy=(81,57),xytext=(90,32),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555")) save(fig,"fig2_reflex_arc.png") # ---------- Fig 3: action potential try: from scipy.interpolate import PchipInterpolator as P except Exception: P=None t=np.array([0,1,1.4,1.7,2.0,2.3,2.7,3.1,3.5,4.2,5,6,7.5]); v=np.array([-70,-70,-55,-20,30,10,-40,-70,-82,-78,-72,-70,-70]) tt=np.linspace(0,7.5,400); vv=P(t,v)(tt) if P else np.interp(tt,t,v) fig,ax=plt.subplots(figsize=(7,4.6)) ax.plot(tt,vv,color="#1f5fa8",lw=2.6) ax.axhline(-55,color="#c0392b",ls="--",lw=1); ax.text(7.5,-52,"Threshold (-55 mV)",color="#c0392b",ha="right",fontsize=8.5) ax.axhline(-70,color="#777",ls=":",lw=1); ax.text(7.5,-74.5,"Resting potential (-70 mV)",color="#555",ha="right",fontsize=8.5) ax.axhline(0,color="#aaa",lw=0.8) ax.annotate("1 Resting",xy=(0.5,-70),xytext=(0.0,-45),fontsize=8.5,arrowprops=dict(arrowstyle="->")) ax.annotate("Stimulus",xy=(1.0,-70),xytext=(0.7,-90),fontsize=8.5,arrowprops=dict(arrowstyle="->"),color="#c0392b") ax.annotate("2 Depolarisation\nNa+ channels open,\nNa+ enters",xy=(1.7,-20),xytext=(0.0,0),fontsize=8.5,arrowprops=dict(arrowstyle="->")) ax.annotate("3 Peak (+30 mV)\nNa+ channels inactivate,\nK+ channels open",xy=(2.0,30),xytext=(2.6,22),fontsize=8.5,arrowprops=dict(arrowstyle="->")) ax.annotate("4 Repolarisation\nK+ leaves cell",xy=(2.6,-30),xytext=(3.3,-8),fontsize=8.5,arrowprops=dict(arrowstyle="->")) ax.annotate("5 Hyperpolarisation\n(K+ channels slow to close)",xy=(3.6,-82),xytext=(3.6,-98),fontsize=8.5,arrowprops=dict(arrowstyle="->")) ax.set_ylim(-105,45); ax.set_xlim(0,7.5) ax.set_xlabel("Time (ms)"); ax.set_ylabel("Membrane potential (mV)") for s in ("top","right"): ax.spines[s].set_visible(False) save(fig,"fig3_action_potential.png") # ---------- Fig 4: synapse fig,ax=newfig(7.2,5.0); ax.set_ylim(0,100) ax.add_patch(FancyBboxPatch((4,38),38,50,boxstyle="round,pad=0.5,rounding_size=6",fc=BLUE,ec="#1f5fa8",lw=2)) ax.add_patch(Rectangle((-2,60),8,10,fc=BLUE,ec="#1f5fa8",lw=2)) ax.add_patch(Rectangle((58,38),38,50,fc=RED,ec="#b03030",lw=2)) ax.text(23,92,"PRESYNAPTIC TERMINAL",ha="center",fontsize=9,fontweight="bold") ax.text(77,92,"POSTSYNAPTIC MEMBRANE\n(dendrite / muscle)",ha="center",fontsize=9,fontweight="bold") ax.text(50,32,"Synaptic cleft\n(about 20-40 nm)",ha="center",fontsize=8.5) ax.text(2,74,"1 Action\npotential\narrives",fontsize=8.5,color="#c0392b",fontweight="bold",ha="left",va="bottom") for (x,y) in [(14,60),(20,52),(26,64),(14,48),(30,54)]: ax.add_patch(Circle((x,y),3,fc="white",ec="#1f5fa8")); ax.plot([x-1,x+1,x],[y-1,y+1,y],"k.",ms=2) ax.add_patch(Ellipse((15,78),10,5,fc="#f0c27b",ec="#555")); ax.text(15,83,"Mitochondrion",fontsize=7.5,ha="center") for y in (66,56): ax.add_patch(Rectangle((41.5,y),2,6,fc="#2e7d32",ec="#2e7d32")) ax.annotate("2 Voltage-gated Ca2+\nchannels open",xy=(43,68),xytext=(30,10),fontsize=8.5,color="#2e7d32",fontweight="bold",arrowprops=dict(arrowstyle="->",color="#2e7d32")) arrow(ax,(48,76),(44,70),color="#2e7d32"); ax.text(46,80,"Ca2+",fontsize=8.5,color="#2e7d32") arrow(ax,(28,56),(41,52),color="#555",rad=0.2); ax.text(14,40,"3 Vesicles fuse and\nrelease transmitter\n(exocytosis)",fontsize=8.5,fontweight="bold") import random; random.seed(2) for _ in range(16): ax.plot(43+random.random()*14,40+random.random()*34,"o",color="#e67e22",ms=3.5) ax.text(50,76,"4 Transmitter\ndiffuses",fontsize=8.5,ha="center",color="#e67e22",fontweight="bold") for y in (72,60,48): ax.add_patch(Polygon([[56.5,y+3],[58,y],[59.5,y+3]],fc="#e67e22",ec="#a04000")) ax.add_patch(Rectangle((58,y-1.5),3,3,fc="#a04000",ec="#a04000")) ax.text(63,76,"Receptor-linked\nion channel",fontsize=8,ha="left") arrow(ax,(70,62),(70,50),color="#1f5fa8"); ax.text(72,56,"Na+ in",fontsize=8.5,color="#1f5fa8") ax.text(77,28,"5 Transmitter binds receptor: channels open,\nEPSP or IPSP produced; signal ends when\ntransmitter is broken down or taken up",ha="center",fontsize=8.5,fontweight="bold",va="center") save(fig,"fig4_synapse.png") # ---------- Fig 5: endocrine system fig,ax=newfig(7.2,7.4,(-45,145),(0,100)) body="#f1e1d0" ax.add_patch(Ellipse((50,90),13,15,fc=body,ec="#8a6d50",lw=1.5)) ax.add_patch(Rectangle((45,77),10,8,fc=body,ec="#8a6d50",lw=1.5)) ax.add_patch(Polygon([[37,81],[63,81],[75,77],[78,58],[66,55],[66,38],[70,25],[30,25],[34,38],[34,55],[22,58],[25,77]],fc=body,ec="#8a6d50",lw=1.5)) ax.add_patch(Rectangle((31,3),18,22,fc=body,ec="#8a6d50",lw=1.5)); ax.add_patch(Rectangle((51,3),18,22,fc=body,ec="#8a6d50",lw=1.5)) def gland(x,y,lab,side,xl,yl,col="#c0392b",s=45): ax.scatter([x],[y],s=s,c=col,zorder=5,edgecolors="k") ax.annotate(lab,xy=(x,y),xytext=(xl,yl),fontsize=9,ha="right" if side=="L" else "left",va="center",arrowprops=dict(arrowstyle="-",color="#444")) gland(52,91.5,"1 Pineal gland","L",-5,95) gland(50,88.2,"2 Pituitary gland (under\nthe hypothalamus)","R",92,95) gland(50,80,"3 Thyroid (and parathyroids)","L",-5,81) gland(50,72,"4 Thymus","R",92,76) ax.scatter([43,57],[58,58],s=45,c="#c0392b",zorder=5,edgecolors="k") ax.annotate("5 Adrenal glands\n(on top of kidneys)",xy=(43,58),xytext=(-5,62),fontsize=9,ha="right",va="center",arrowprops=dict(arrowstyle="-",color="#444")) gland(52,53,"6 Pancreas (islets)","R",92,55) ax.scatter([42,58],[37,37],s=45,c="#c0392b",zorder=5,edgecolors="k") ax.annotate("7 Ovaries (female)",xy=(42,37),xytext=(-5,40),fontsize=9,ha="right",va="center",arrowprops=dict(arrowstyle="-",color="#444")) ax.scatter([46,54],[27,27],s=35,c="#2c6fb7",zorder=5,edgecolors="k") ax.annotate("8 Testes (male)",xy=(54,27),xytext=(92,30),fontsize=9,ha="left",va="center",arrowprops=dict(arrowstyle="-",color="#444")) save(fig,"fig5_endocrine_system.png") # ---------- Fig 6: hormone action at nucleus fig,ax=newfig(7.4,6.6) ax.add_patch(Rectangle((0,82),100,18,fc="#fbe3e3",ec="none")); ax.text(2,97,"Blood plasma",fontsize=8.5,style="italic") ax.add_patch(FancyBboxPatch((3,4),94,76,boxstyle="round,pad=0.3,rounding_size=4",fc="#fffbe9",ec="#8a5a00",lw=3)) ax.text(95,77,"Plasma membrane",fontsize=8,ha="right",color="#8a5a00",style="italic"); ax.text(8,7,"Cytoplasm",fontsize=8.5,style="italic") ax.add_patch(Rectangle((8,86),7,6,fc="#bbb",ec="#555")); ax.text(11.5,89,"CP",fontsize=7,ha="center") ax.add_patch(Circle((17.5,89),2.5,fc="#e67e22",ec="#a04000")); ax.text(17.5,89,"H",fontsize=8,ha="center",va="center",color="white",fontweight="bold") ax.text(4,83.8,"1 Hormone carried on\ncarrier protein (CP)",fontsize=7.8,va="top") arrow(ax,(18,85),(18,66),color="#e67e22",lw=2); ax.text(20,76,"2 Free hormone diffuses\nthrough lipid bilayer",fontsize=8,va="center") ax.add_patch(Rectangle((14,56),9,5,fc=PURP,ec="#5b3a8a")); ax.text(18.5,58.5,"R",fontsize=8,ha="center",va="center") for dx in (-1.5,2,5.5): ax.add_patch(Circle((15.5+dx+1.5,63),1.4,fc="#999",ec="#555")) ax.text(5,51,"3 H binds receptor (R); heat-shock\nproteins (grey) are released",fontsize=8,va="top") ax.add_patch(Circle((18,40),2.5,fc="#e67e22",ec="#a04000")); ax.add_patch(Rectangle((20,38),8,4,fc=PURP,ec="#5b3a8a")); ax.text(5,33,"H-R complex\n(dimer)",fontsize=8,va="top") arrow(ax,(18,56),(18,44),color="#5b3a8a",lw=1.8) ax.add_patch(Ellipse((66,42),48,38,fc="#e8f1fb",ec="#1f5fa8",lw=2.5)); ax.text(66,58,"NUCLEUS",fontsize=9,fontweight="bold",ha="center",color="#1f5fa8") ax.add_patch(Rectangle((41.5,39),2.5,6,fc="white",ec="#1f5fa8",lw=1.5)); ax.text(35,48,"Nuclear\npore",fontsize=8,ha="center") arrow(ax,(30,40),(48,42),color="#5b3a8a",lw=2.0); ax.text(36,34,"4 Enters nucleus",fontsize=8,ha="center") ax.plot([48,86],[38,38],color="k",lw=2.5); ax.text(86.5,38,"DNA",fontsize=8,va="center") ax.add_patch(Rectangle((50,37),7,2.6,fc="#e67e22",ec="k")); ax.text(53.5,34,"HRE",fontsize=8,ha="center",fontweight="bold") ax.add_patch(Rectangle((66,37),12,2.6,fc="#7fb77e",ec="k")); ax.text(72,34,"Target gene",fontsize=8,ha="center",fontweight="bold") ax.add_patch(Circle((52,42),2,fc="#e67e22",ec="#a04000")); ax.add_patch(Rectangle((54,41),6,3,fc=PURP,ec="#5b3a8a")) ax.text(56,50,"5 H-R binds the hormone\nresponse element (HRE):\ntranscription starts",fontsize=7.8,ha="center") xs=np.linspace(68,76,30); ax.plot(xs,26+1.4*np.sin(xs*3),color="#c0392b",lw=2); ax.text(79,25,"mRNA",fontsize=8,color="#c0392b",fontweight="bold") arrow(ax,(70,24),(70,18),color="#c0392b"); ax.add_patch(Rectangle((68.5,22.5),3,3,fc="white",ec="#1f5fa8")) for dx in (0,3.5): ax.add_patch(Circle((62+dx,12),1.8,fc="#888",ec="#444")) ax.text(50,7.5,"6 mRNA leaves via pore; ribosomes make new protein",fontsize=8,ha="left") arrow(ax,(70,14),(88,14),color="#2e7d32",lw=2); ax.text(88,17,"Cell response",fontsize=8,color="#2e7d32",fontweight="bold",ha="right") save(fig,"fig6_hormone_nucleus.png") # ---------- Fig 7: positive feedback oxytocin fig,ax=newfig(7.2,5.6) pos=[(50,90),(85,62),(72,18),(28,18),(15,62)] txt=["1 Baby's head stretches\nthe cervix (stimulus)","2 Stretch receptors send\nimpulses along sensory\nneurones to hypothalamus","3 Posterior pituitary\nreleases OXYTOCIN\ninto the blood","4 Oxytocin stimulates\nstronger uterine\ncontractions","5 Baby pushed harder\nagainst cervix: more\nstretch"] cols=[YEL,BLUE,ORANGE,ORANGE,GREEN] for (x,y),t,c in zip(pos,txt,cols): box(ax,x,y,30,15,t,c,8.5) for i in range(5): a=pos[i]; b=pos[(i+1)%5] d=np.array(b)-np.array(a); n=d/np.linalg.norm(d) arrow(ax,tuple(np.array(a)+n*15*(1 if abs(d[0])<abs(d[1]) else 1.05)),tuple(np.array(b)-n*15),color="#c0392b",lw=2,rad=-0.2) ax.text(50,52,"POSITIVE\nFEEDBACK (+)\nEach cycle amplifies\nthe stimulus",ha="center",va="center",fontsize=9.5,fontweight="bold",color="#c0392b") ax.text(50,2,"Loop ends only when the baby is delivered and the cervical stretch stops.",ha="center",fontsize=8.5,style="italic") save(fig,"fig7_positive_feedback.png") # ---------- Fig 8: glucose flow chart fig,ax=newfig(9.2,11.4); ax.set_xlim(0,100); ax.set_ylim(0,106) box(ax,50,101,52,6,"NORMAL BLOOD GLUCOSE (set point about 4-6 mmol/L)",YEL,9,bold=True) L,R=24,76; W=44 arrow(ax,(38,98),(L,92)); arrow(ax,(62,98),(R,92)) ax.text(L-3,95.5,"After a meal /\nstress",fontsize=8,ha="right"); ax.text(R+3,95.5,"Fasting /\nexercise",fontsize=8,ha="left") rows=[(88,"STIMULUS","Blood glucose RISES above set point","Blood glucose FALLS below set point",RED,RED), (76,"RECEPTORS","Beta cells of pancreatic islets and glucose-sensing neurones in hypothalamus detect rise","Alpha cells of islets and glucose-sensing neurones in hypothalamus/brainstem detect fall",GREY,GREY), (61,"NERVOUS SYSTEM (control centre, fast)","Hypothalamus activates PARASYMPATHETIC (vagus) nerves: stimulate beta cells (also cephalic phase on seeing/tasting food)","Hypothalamus activates SYMPATHETIC nerves: stimulate alpha cells and adrenal medulla, inhibit beta cells",BLUE,BLUE), (44,"ENDOCRINE SYSTEM (hormones, sustained)","INSULIN released from beta cells into blood","GLUCAGON (alpha cells) + ADRENALINE (adrenal medulla); cortisol and growth hormone in prolonged fasting",ORANGE,ORANGE), (27,"EFFECTORS","Liver: glucose to glycogen (glycogenesis), less gluconeogenesis. Muscle and fat: GLUT4 uptake of glucose","Liver: glycogenolysis and gluconeogenesis. Adipose tissue: lipolysis (fuel sparing)",GREEN,GREEN), (13,"RESPONSE","Blood glucose FALLS","Blood glucose RISES",YEL,YEL)] for y,lab,lt,rt,c1,c2 in rows: h=11 if y not in (88,13) else 7.5 box(ax,L,y,W,h,lt,c1,8,wrap=44); box(ax,R,y,W,h,rt,c2,8,wrap=44) ax.text(50,y+h/2+1.3,lab,ha="center",fontsize=7.8,fontweight="bold",color="#222") if y in (76,61,44,27) else None for xcol in (L,R): for (y1,y2) in [(84.2,81.8),(70,67.5),(55,50.5),(37.5,32.5),(21.5,16.8)]: pass for xcol in (L,R): arrow(ax,(xcol,84.2),(xcol,82)); arrow(ax,(xcol,70.5),(xcol,67.5)); arrow(ax,(xcol,55.5),(xcol,49.5)); arrow(ax,(xcol,38.5),(xcol,32.5)); arrow(ax,(xcol,21.5),(xcol,16.8)) ax.text(L,88+0,"",fontsize=1) box(ax,50,3,60,5.5,"Glucose returns to set point: stimulus removed, hormone secretion switches OFF (negative feedback)",YEL,8.3,wrap=70,bold=True) c="#c0392b" arrow(ax,(L,9.2),(40,5.5),color=c,ls="--",rad=0.2); arrow(ax,(R,9.2),(60,5.5),color=c,ls="--",rad=-0.2) ax.plot([2,2],[3,101],color=c,ls="--",lw=1.5); ax.plot([2,23],[101,101],color=c,ls="--",lw=1.5) ax.plot([2,20],[3,3],color=c,ls="--",lw=1.5); arrow(ax,(20,3),(20,3.01),color=c) arrow(ax,(2,101),(24,101),color=c,ls="--",lw=1.5); ax.text(4,52,"Negative feedback loop",rotation=90,color=c,fontsize=8.5,va="center") ax.set_xlim(0,100) ax.add_patch(Rectangle((60,104),0,0)); # legend for i,(c1,l) in enumerate([(BLUE,"Nervous system"),(ORANGE,"Endocrine system")]): ax.add_patch(Rectangle((70+i*0,104.3-i*2.6),3,2,fc=c1,ec="#333")); ax.text(74,105.3-i*2.6,l,fontsize=8,va="center") save(fig,"fig8_glucose_flowchart.png") print("ok") EOF cd /tmp/workspace/homeostasis-report/src && python3 figs.py

Let me check the figures visually.
Reading File
Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/homeostasis-report/src && cat > figs2.py << 'EOF' exec(open('figs.py').read().split('# ---------- Fig 1')[0]) import random # ---------- Fig 2 reflex arc fig,ax=newfig(7.4,6.4); ax.set_xlim(-5,112); ax.set_ylim(5,100) ax.add_patch(Ellipse((60,50),44,42,fc="#f3efe6",ec="#777",lw=2)) for (x,y,w,h,a) in [(60,50,16,9,0),(54,61,6,16,-20),(66,61,6,16,20),(52,40,10,18,20),(68,40,10,18,-20)]: ax.add_patch(Ellipse((x,y),w,h,angle=a,fc="#b9b9c9",ec="#666",lw=1)) ax.add_patch(Circle((60,50),1.2,fc="white",ec="#666")) ax.add_patch(Polygon([[0,88],[12,88],[9,94],[3,94]],fc="#e74c3c",ec="#900")) ax.text(6,97,"Hot object (stimulus)",fontsize=8.5,ha="center",color="#c0392b",fontweight="bold") ax.add_patch(Ellipse((9,80),10,5,fc=YEL,ec="#555")); ax.text(9,75.5,"Receptor in skin",fontsize=8,ha="center") arrow(ax,(14,79),(34,72),color="#1f5fa8",lw=2.2,rad=-0.15,style="-") ax.add_patch(Ellipse((38,71),8,6,fc=BLUE,ec="#1f5fa8",lw=1.5,zorder=3)); ax.text(38,77,"Cell body in dorsal\nroot ganglion",fontsize=8,ha="center") arrow(ax,(42,69),(55,56),color="#1f5fa8",lw=2.2,rad=-0.1) ax.text(8,64,"SENSORY neurone\n(afferent): receptor to\nspinal cord",fontsize=8.3,color="#1f5fa8",fontweight="bold",ha="left") ax.add_patch(Circle((57,52),2.6,fc=GREEN,ec="#2e7d32",lw=1.5,zorder=4)) arrow(ax,(57,50),(53,40),color="#2e7d32",lw=2.2,rad=0.2) arrow(ax,(59,54),(80,92),color="#2e7d32",lw=1.6,rad=-0.2,ls="--") ax.text(88,95,"To brain (pain felt\nafter withdrawal)",fontsize=8,ha="center") ax.text(86,70,"RELAY neurone\n(interneurone) in\ngrey matter",fontsize=8.3,color="#2e7d32",fontweight="bold",ha="left",va="center") ax.add_patch(Circle((52,38),3,fc=RED,ec="#b03030",lw=1.5,zorder=4)) arrow(ax,(49,36),(30,24),color="#b03030",lw=2.2,rad=0.1) arrow(ax,(30,24),(15,19),color="#b03030",lw=2.2,rad=0.1) ax.text(32,12,"MOTOR neurone (efferent):\nspinal cord to muscle",fontsize=8.3,color="#b03030",fontweight="bold",ha="center") ax.add_patch(Ellipse((9,22),14,7,fc="#e8a0a0",ec="#800")); ax.text(9,28,"Effector (biceps\nmuscle contracts)",fontsize=8,ha="center") ax.annotate("Dorsal (sensory) root",xy=(46,62),xytext=(-3,54),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555")) ax.annotate("Ventral (motor) root",xy=(43,33),xytext=(-3,42),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555")) ax.annotate("Grey matter",xy=(68,44),xytext=(88,40),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555")) ax.annotate("White matter",xy=(79,50),xytext=(88,50),fontsize=8,arrowprops=dict(arrowstyle="-",color="#555"),va="center") ax.text(66,24,"Spinal cord (cross-section)",fontsize=8.5,ha="center",style="italic") ax.text(60,8,"Synapses lie between sensory-relay and relay-motor neurones",fontsize=8,ha="center",style="italic") save(fig,"fig2_reflex_arc.png") # ---------- Fig 4 synapse fig,ax=newfig(7.4,5.4); ax.set_xlim(-3,100); ax.set_ylim(0,102) ax.add_patch(FancyBboxPatch((4,34),34,54,boxstyle="round,pad=0.5,rounding_size=6",fc=BLUE,ec="#1f5fa8",lw=2)) ax.add_patch(Rectangle((-3,62),9,10,fc=BLUE,ec="#1f5fa8",lw=2)) ax.add_patch(Rectangle((62,34),34,54,fc=RED,ec="#b03030",lw=2)) ax.text(21,97,"PRESYNAPTIC TERMINAL",ha="center",fontsize=9,fontweight="bold") ax.text(79,97,"POSTSYNAPTIC MEMBRANE",ha="center",fontsize=9,fontweight="bold") ax.text(-1,74,"1 Action potential\narrives",fontsize=8,color="#c0392b",fontweight="bold",ha="left",va="bottom") for (x,y) in [(13,64),(21,56),(28,66),(14,52),(30,55)]: ax.add_patch(Circle((x,y),3,fc="white",ec="#1f5fa8")); ax.plot([x-1,x+1,x],[y-1,y+1,y],"k.",ms=2) ax.add_patch(Ellipse((27,80),10,5,fc="#f0c27b",ec="#555")); ax.text(27,84,"Mitochondrion",fontsize=7.5,ha="center") for y in (66,56): ax.add_patch(Rectangle((37,y),2.2,6,fc="#2e7d32",ec="#2e7d32")) ax.text(50,84,"2 Ca2+ enters through\nvoltage-gated channels",fontsize=7.8,ha="center",color="#2e7d32",fontweight="bold") arrow(ax,(46,80),(39,70),color="#2e7d32") ax.text(21,40,"3 Vesicles fuse and release\ntransmitter (exocytosis)",fontsize=8,ha="center",fontweight="bold") arrow(ax,(30,52),(37,50),color="#555",rad=0.2) random.seed(2) for _ in range(16): ax.plot(41+random.random()*18,38+random.random()*34,"o",color="#e67e22",ms=3.5) ax.text(50,24,"4 Transmitter diffuses across\nthe synaptic cleft (20-40 nm)",fontsize=8,ha="center",color="#c0661a",fontweight="bold") for y in (72,60,48): ax.add_patch(Polygon([[60,y+3],[61.5,y],[63,y+3]],fc="#e67e22",ec="#a04000")) ax.add_patch(Rectangle([62,y-1.5],3,3,fc="#a04000",ec="#a04000")) ax.text(68,80,"Receptor-linked\nion channels",fontsize=8,ha="left") arrow(ax,(78,66),(78,48),color="#1f5fa8"); ax.text(80,57,"Na+ in",fontsize=8.5,color="#1f5fa8") ax.text(76,12,"5 Transmitter binds receptor: channels open and an EPSP or IPSP forms.\nSignal ends when transmitter is broken down or taken back up.",ha="center",fontsize=8,fontweight="bold",va="center") save(fig,"fig4_synapse.png") # ---------- Fig 6 fig,ax=newfig(7.4,6.6) ax.add_patch(Rectangle((0,82),100,18,fc="#fbe3e3",ec="none")); ax.text(2,97,"Blood plasma",fontsize=8.5,style="italic") ax.add_patch(FancyBboxPatch((3,4),94,76,boxstyle="round,pad=0.3,rounding_size=4",fc="#fffbe9",ec="#8a5a00",lw=3)) ax.text(95,77,"Plasma membrane",fontsize=8,ha="right",color="#8a5a00",style="italic"); ax.text(8,6.5,"Cytoplasm",fontsize=8.5,style="italic") ax.add_patch(Rectangle((8,86),7,6,fc="#bbb",ec="#555")); ax.text(11.5,89,"CP",fontsize=7,ha="center",va="center") ax.add_patch(Circle((17.5,89),2.5,fc="#e67e22",ec="#a04000")); ax.text(17.5,89,"H",fontsize=8,ha="center",va="center",color="white",fontweight="bold") ax.text(24,89,"1 Hormone (H) carried on\ncarrier protein (CP)",fontsize=7.8,va="center") arrow(ax,(18,85),(18,66),color="#e67e22",lw=2); ax.text(21,75,"2 Free hormone diffuses\nthrough lipid bilayer",fontsize=8,va="center") ax.add_patch(Rectangle((14,56),9,5,fc=PURP,ec="#5b3a8a")); ax.text(18.5,58.5,"R",fontsize=8,ha="center",va="center") for dx in (0,3.5,7): ax.add_patch(Circle((15+dx,63),1.4,fc="#999",ec="#555")) ax.text(26,59,"3 H binds receptor (R);\nheat-shock proteins\n(grey) are released",fontsize=7.8,va="center") arrow(ax,(18,55),(18,44),color="#5b3a8a",lw=1.8) ax.add_patch(Circle((16,40),2.5,fc="#e67e22",ec="#a04000")); ax.add_patch(Rectangle((18,38),8,4,fc=PURP,ec="#5b3a8a")); ax.text(8,33,"H-R complex (dimer)",fontsize=8,va="top") ax.add_patch(Ellipse((66,42),48,38,fc="#e8f1fb",ec="#1f5fa8",lw=2.5)); ax.text(66,58,"NUCLEUS",fontsize=9,fontweight="bold",ha="center",color="#1f5fa8") ax.add_patch(Rectangle((41.5,39),2.5,6,fc="white",ec="#1f5fa8",lw=1.5)); ax.text(42.8,47,"Nuclear pore",fontsize=7.5,ha="center") arrow(ax,(28,40),(48,41),color="#5b3a8a",lw=2.0); ax.text(37,35,"4 Enters nucleus",fontsize=8,ha="center") ax.plot([48,86],[38,38],color="k",lw=2.5); ax.text(86.5,38,"DNA",fontsize=8,va="center") ax.add_patch(Rectangle((50,37),7,2.6,fc="#e67e22",ec="k")); ax.text(53.5,34,"HRE",fontsize=8,ha="center",fontweight="bold") ax.add_patch(Rectangle((66,37),12,2.6,fc="#7fb77e",ec="k")); ax.text(72,34,"Target gene",fontsize=8,ha="center",fontweight="bold") ax.add_patch(Circle((52,42),2,fc="#e67e22",ec="#a04000")); ax.add_patch(Rectangle((54,41),6,3,fc=PURP,ec="#5b3a8a")) ax.text(68,49,"5 H-R binds hormone response\nelement (HRE): transcription starts",fontsize=7.8,ha="center") xs=np.linspace(66,74,30); ax.plot(xs,28+1.2*np.sin(xs*3),color="#c0392b",lw=2); ax.text(76,28,"mRNA",fontsize=8,color="#c0392b",fontweight="bold") ax.add_patch(Rectangle((68.5,22),3,3,fc="white",ec="#1f5fa8")); arrow(ax,(70,22),(70,16),color="#c0392b") for dx in (0,3.5): ax.add_patch(Circle((69+dx,13),1.8,fc="#888",ec="#444")) ax.text(9,15,"6 mRNA leaves via pore;\nribosomes make new protein",fontsize=7.8,va="center") arrow(ax,(78,13),(92,13),color="#2e7d32",lw=2); ax.text(85,16,"Cell\nresponse",fontsize=7.8,color="#2e7d32",fontweight="bold",ha="center") save(fig,"fig6_hormone_nucleus.png") # ---------- Fig 8 glucose flowchart fig,ax=newfig(9.2,11.6); ax.set_xlim(-6,106); ax.set_ylim(-6,106) box(ax,50,100,64,6,"NORMAL BLOOD GLUCOSE (set point about 4-6 mmol/L)",YEL,9,bold=True) L,R=25,75; W=44 arrow(ax,(38,97),(L,92.5)); arrow(ax,(62,97),(R,92.5)) ax.text(18,96,"After a meal",fontsize=8.5,ha="right",style="italic"); ax.text(82,96,"Fasting / exercise",fontsize=8.5,ha="left",style="italic") rows=[(88,"STIMULUS","Blood glucose RISES above set point","Blood glucose FALLS below set point",RED,7.5), (75,"RECEPTORS","Beta cells of pancreatic islets and glucose-sensing neurones in the hypothalamus detect the rise","Alpha cells of islets and glucose-sensing neurones in hypothalamus/brainstem detect the fall",GREY,12), (59,"NERVOUS SYSTEM (control, fast)","Hypothalamus activates PARASYMPATHETIC (vagus) nerves: stimulate beta cells (also before eating: sight and taste of food)","Hypothalamus activates SYMPATHETIC nerves: stimulate alpha cells and adrenal medulla, inhibit beta cells",BLUE,14), (42,"ENDOCRINE SYSTEM (hormones, sustained)","INSULIN released from beta cells into the blood","GLUCAGON (alpha cells) and ADRENALINE (adrenal medulla); cortisol and growth hormone in prolonged fasting",ORANGE,12), (26,"EFFECTORS","Liver: glucose to glycogen, less gluconeogenesis. Muscle and fat: GLUT4 uptake of glucose","Liver: glycogenolysis and gluconeogenesis. Adipose tissue: lipolysis (fuel sparing)",GREEN,12), (12,"RESPONSE","Blood glucose FALLS towards set point","Blood glucose RISES towards set point",YEL,9)] for y,lab,lt,rt,c,h in rows: for x,t in ((L,lt),(R,rt)): ax.add_patch(FancyBboxPatch((x-W/2,y-h/2),W,h,boxstyle="round,pad=0.3,rounding_size=1.5",fc=c,ec="#333",lw=1.2)) ax.text(x,y+h/2-1.6,lab,ha="center",va="top",fontsize=7.8,fontweight="bold") ax.text(x,y-1.2,textwrap.fill(t,46),ha="center",va="center",fontsize=8) for x in (L,R): for y1,y2 in [(84,79.5),(68.8,66.2),(51.8,48.2),(35.8,32.2),(19.8,16.7)]: arrow(ax,(x,y1),(x,y2)) box(ax,50,-2,70,6,"Glucose returns to set point: stimulus removed, hormone release switches OFF",YEL,8.3,bold=True) arrow(ax,(L,7.5),(40,1.2),rad=0.1); arrow(ax,(R,7.5),(60,1.2),rad=-0.1) c="#c0392b" for x,xe in ((-1,L-W/2),(101,R+W/2)): ax.plot([xe,x],[12,12],color=c,ls="--",lw=1.6); ax.plot([x,x],[12,88],color=c,ls="--",lw=1.6) arrow(ax,(x,88),(xe,88),color=c,ls="--",lw=1.6) ax.text(-3.5,50,"NEGATIVE FEEDBACK: response removes the stimulus",rotation=90,color=c,fontsize=8.3,va="center",ha="center") ax.text(103.5,50,"NEGATIVE FEEDBACK: response removes the stimulus",rotation=270,color=c,fontsize=8.3,va="center",ha="center") for i,(c1,l) in enumerate([(BLUE,"Nervous system"),(ORANGE,"Endocrine system")]): ax.add_patch(Rectangle((5+i*22,102-0.0),3,2.2,fc=c1,ec="#333")); ax.text(9+i*22,103.1,l,fontsize=8,va="center") save(fig,"fig8_glucose_flowchart.png") print("ok") EOF python3 figs2.py

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/homeostasis-report/src && python3 - << 'EOF' s=open('figs2.py').read() s=s.replace('ax.set_ylim(-6,106)','ax.set_ylim(-11,106)') s=s.replace('ax.add_patch(Rectangle((5+i*22,102-0.0),3,2.2,fc=c1,ec="#333")); ax.text(9+i*22,103.1,l,fontsize=8,va="center")','ax.add_patch(Rectangle((32+i*22,-10),3,2.2,fc=c1,ec="#333")); ax.text(36+i*22,-8.9,l,fontsize=8,va="center")') s=s.replace('ax.text(50,84,"2 Ca2+ enters through\\nvoltage-gated channels",fontsize=7.8','ax.text(49,87,"2 Ca2+ enters through\\nvoltage-gated\\nchannels",fontsize=7.4') s=s.replace('arrow(ax,(46,80),(39,70),color="#2e7d32")','arrow(ax,(46,80),(39,70),color="#2e7d32")') s=s.replace('ax.text(37,35,"4 Enters nucleus"','ax.text(33,34,"4 Enters nucleus"') open('figs2.py','w').write(s) f=open('figs.py').read() f=f.replace('ax.text(50,2,"Loop ends only','ax.set_xlim(-5,105); ax.text(50,2,"Loop ends only') open('figs.py','w').write(f) EOF python3 figs.py && python3 figs2.py

Reading File
Reading File
Running Command

cd /tmp/workspace/homeostasis-report/src && cat > build.py << 'EOF' from docx import Document from docx.shared import Pt, Inches, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.oxml.ns import qn from docx.oxml import OxmlElement import re F="/tmp/workspace/homeostasis-report/figs/" doc=Document() for s in doc.sections: s.left_margin=s.right_margin=Inches(1); s.top_margin=s.bottom_margin=Inches(0.9) st=doc.styles["Normal"]; st.font.name="Arial"; st.font.size=Pt(10.5) st.element.rPr.rFonts.set(qn("w:eastAsia"),"Arial") st.paragraph_format.space_after=Pt(6); st.paragraph_format.line_spacing=1.15 for n,sz in (("Heading 1",14),("Heading 2",12)): h=doc.styles[n]; h.font.name="Arial"; h.font.size=Pt(sz); h.font.bold=True; h.font.color.rgb=RGBColor(0x1F,0x3A,0x5F) h.element.rPr.rFonts.set(qn("w:eastAsia"),"Arial") body=[] # counted text def P(t,style=None,count=True,italic=False,align=None): p=doc.add_paragraph(style=style); r=p.add_run(t); r.italic=italic if align: p.alignment=align if count: body.append(t) return p def H(t,count=True): doc.add_heading(t,level=1) if count: body.append(t) def B(items): for lead,t in items: p=doc.add_paragraph(style="List Bullet"); r=p.add_run(lead); r.bold=True; p.add_run(t); body.append(lead+t) def FIG(name,cap,w=5.4): p=doc.add_paragraph(); p.alignment=WD_ALIGN_PARAGRAPH.CENTER; p.add_run().add_picture(F+name,width=Inches(w)); p.paragraph_format.keep_with_next=True c=P(cap,italic=True,align=WD_ALIGN_PARAGRAPH.CENTER); for r in c.runs: r.font.size=Pt(9) # title block t=doc.add_paragraph(); t.alignment=WD_ALIGN_PARAGRAPH.CENTER r=t.add_run("The Nervous and Endocrine Systems: Coordination and Homeostasis"); r.bold=True; r.font.size=Pt(18); r.font.color.rgb=RGBColor(0x1F,0x3A,0x5F) for line in ("Student name: [insert] Student ID: [insert]","Unit / Assignment: [insert] Date: [insert]"): q=doc.add_paragraph(line); q.alignment=WD_ALIGN_PARAGRAPH.CENTER H("1. Introduction") P("Cells work only within narrow limits of temperature, water content, pH and glucose supply. Two systems keep these conditions steady. The nervous system acts quickly through electrical impulses and chemical transmitters, while the endocrine system acts more slowly through hormones carried in the blood (Marieb and Hoehn, 2019). This report defines homeostasis and feedback, explains neurone function, action potentials and synapses, identifies the endocrine glands, describes how hormones act on the nucleus, and uses a flow chart to show how both systems regulate blood glucose.") H("2. Homeostasis and negative feedback (A.C. 1.1)") P("Homeostasis is the maintenance of a relatively stable internal environment despite external and internal change (Cannon, 1932; Hall and Hall, 2021). Most homeostatic systems use negative feedback: a change in a variable is detected and the response opposes it, returning the variable towards its set point. The loop has a receptor that senses the change, a control centre that compares it with the set point, and an effector that produces the correction (Tortora and Derrickson, 2017). Negative feedback is the more important and common way of regulating hormone secretion (Costanzo, 2022).") P("Thyroid hormone control is a hormonal example (Figure 1). The hypothalamus releases thyrotropin-releasing hormone (TRH), which stimulates the anterior pituitary to release thyroid-stimulating hormone (TSH). TSH makes the thyroid secrete thyroxine (T4) and triiodothyronine (T3). Rising T3 and T4 inhibit TRH and TSH release, so thyroid output falls. When levels drop, the inhibition lifts and secretion rises again.") FIG("fig1_thyroid_feedback.png","Figure 1: Negative feedback control of thyroid hormones.",3.9) H("3. Reflex action and types of neurone (A.C. 1.2)") P("A reflex is a rapid, automatic response to a stimulus. Pulling a hand from a hot object (the withdrawal reflex) shows the three neurone types (Figure 2).") B([("Sensory (afferent) neurones: ","thermal and pain receptors in the skin generate impulses, which travel to the spinal cord through the dorsal root. Their cell bodies lie in the dorsal root ganglion."), ("Relay neurones (interneurones): ","lie in spinal grey matter and connect sensory to motor neurones. Branches also send signals to the brain, so pain is felt after withdrawal has begun."), ("Motor (efferent) neurones: ","cell bodies in the ventral horn send impulses through the ventral root to the effector, here the biceps, which contracts.")]) P("Because few synapses are involved and the brain is bypassed, the response is fast and protective (Marieb and Hoehn, 2019).") FIG("fig2_reflex_arc.png","Figure 2: Withdrawal reflex arc.",4.8) H("4. Action potential and synaptic transmission (A.C. 1.3)") P("An action potential is a brief, all-or-none reversal of membrane potential. Its steps are shown in Figure 3 (Hodgkin and Huxley, 1952; Hall and Hall, 2021).") for i,t in enumerate(["Resting potential: about -70 mV, maintained by the Na+/K+ pump and K+ leak channels.","Stimulus and threshold: depolarisation to about -55 mV opens voltage-gated Na+ channels.","Depolarisation: Na+ rushes in, which opens more channels (positive feedback) and the potential reaches about +30 mV.","Repolarisation: Na+ channels inactivate and voltage-gated K+ channels open, so K+ leaves the cell.","Hyperpolarisation: K+ channels close slowly, so the potential dips below rest before the pump restores -70 mV. The refractory period makes the impulse travel one way."],1): p=doc.add_paragraph(style="List Number"); p.add_run(t); body.append(t) FIG("fig3_action_potential.png","Figure 3: Phases of an action potential.",4.6) P("At a chemical synapse (Figure 4), the impulse reaches the presynaptic terminal and opens voltage-gated Ca2+ channels. Ca2+ entry makes vesicles fuse with the membrane and release neurotransmitter, such as acetylcholine, into the cleft. The transmitter diffuses across and binds receptors on the postsynaptic membrane, opening ion channels. This produces an excitatory or inhibitory postsynaptic potential, and a new action potential forms if threshold is reached. Enzymes such as acetylcholinesterase, or reuptake, remove the transmitter and end the signal (Silverthorn, 2019).") FIG("fig4_synapse.png","Figure 4: A chemical synapse.",4.8) H("5. The endocrine system (A.C. 2.1)") P("Endocrine glands are ductless and release hormones into the blood to act on target cells that carry specific receptors (Figure 5). Compared with nervous control, onset is slower and effects last longer (Hall and Hall, 2021). Table 1 matches each gland with its main secretion.") FIG("fig5_endocrine_system.png","Figure 5: Labelled endocrine glands.",3.9) P("Table 1: Endocrine glands and main secretions.",italic=True) rows=[("Pituitary","Prolactin","Stimulates milk production"),("Thyroid","Thyroxine","Raises metabolic rate"),("Thymus","Thymopoietin","Maturation of T lymphocytes"),("Adrenal","Aldosterone","Na+ retention by kidney"),("Pancreas","Glucagon","Raises blood glucose"),("Testis","Testosterone","Male characteristics, sperm production"),("Ovary","Progesterone","Prepares and maintains uterus"),("Pineal","Melatonin","Sleep-wake rhythm")] tb=doc.add_table(rows=1,cols=3); tb.style="Light Grid Accent 1" for c,t in zip(tb.rows[0].cells,("Gland","Main secretion","Main action")): c.text=t body.append("Gland Main secretion Main action") for r in rows: cs=tb.add_row().cells for c,t in zip(cs,r): c.text=t body.append(" ".join(r)) for row in tb.rows: for c in row.cells: for p in c.paragraphs: p.paragraph_format.space_after=Pt(0) for rn in p.runs: rn.font.size=Pt(9.5) doc.add_paragraph() H("6. How hormones act on the nucleus (A.C. 2.2)") P("Peptide hormones bind surface receptors and use second messengers. Steroid and thyroid hormones are lipid soluble and act on genes (Figure 6). They travel in blood bound to carrier proteins, and the free hormone diffuses through the plasma membrane. It binds an intracellular receptor, for example the glucocorticoid receptor in the cytoplasm, which releases its heat-shock proteins. Thyroid hormone receptors are already in the nucleus. The hormone-receptor complex dimerises, passes through a nuclear pore and binds a hormone response element on DNA with co-regulators. Transcription of target genes is switched on (or sometimes off). The mRNA leaves the nucleus and is translated into proteins that produce the response (Vanderah, 2024; Ferrier, 2021). This is slower than surface-receptor action but lasts longer.") FIG("fig6_hormone_nucleus.png","Figure 6: Steroid hormone action at the nucleus.",4.7) H("7. Positive feedback (A.C. 2.3)") P("Positive feedback amplifies a change instead of reversing it. It is rare in hormone control (Costanzo, 2022). It supports homeostasis by completing a one-off event rapidly, and labour is the classic example (Figure 7). The baby's head stretches the cervix, and stretch receptors send impulses to the hypothalamus. The posterior pituitary releases oxytocin, which strengthens uterine contractions and pushes the baby harder against the cervix. More stretch gives more oxytocin, and the loop continues until delivery removes the stimulus (Tortora and Derrickson, 2017). The loop is therefore neuroendocrine, combining a neural reflex with a hormone.") FIG("fig7_positive_feedback.png","Figure 7: Positive feedback during childbirth.",4.4) H("8. Blood glucose regulation (A.C. 3.1)") P("Blood glucose is held at about 4 to 6 mmol/L. The flow chart in Figure 8 shows that both systems share the work.") B([("Nervous system: ","glucose-sensing neurones in the hypothalamus and brainstem detect changes. Parasympathetic (vagal) nerves stimulate insulin release, including before eating. Sympathetic nerves stimulate glucagon and adrenaline release and inhibit insulin, giving a fast response to hypoglycaemia or stress (Silverthorn, 2019)."), ("Endocrine system: ","pancreatic beta cells release insulin when glucose rises, so liver, muscle and fat take up glucose and store it as glycogen or fat. Alpha cells release glucagon when glucose falls, so the liver breaks down glycogen and makes new glucose. Adrenaline, cortisol and growth hormone support this in stress and prolonged fasting (Hall and Hall, 2021).")]) P("Each response removes its own stimulus, so hormone release switches off, which is negative feedback. The nervous system gives speed and anticipation, and the endocrine system gives a sustained effect. Failure of insulin action causes diabetes mellitus.") doc.add_page_break() pf=doc.add_paragraph(); pf.alignment=WD_ALIGN_PARAGRAPH.CENTER; pf.add_run().add_picture(F+"fig8_glucose_flowchart.png",height=Inches(8.0)) cf=doc.add_paragraph("Figure 8: Flow chart of blood glucose regulation showing nervous and endocrine roles.",); cf.alignment=WD_ALIGN_PARAGRAPH.CENTER for r in cf.runs: r.italic=True; r.font.size=Pt(9) doc.add_page_break() H("9. Conclusion") P("The nervous and endocrine systems coordinate the body in complementary ways. Neurones use action potentials and synapses for rapid, precise control, while hormones act through blood and, for steroids and thyroid hormone, through gene transcription for slower, longer effects. Negative feedback maintains homeostasis, as in thyroid and glucose control, and positive feedback drives events like labour to completion. Often both systems work together through the hypothalamus and pituitary, so stability of the internal environment depends on their integration.") doc.add_heading("Reference list",level=1) refs=["Barrett, K.E., Barman, S.M., Brooks, H.L. and Yuan, J.X.-J. (2019) Ganong's Review of Medical Physiology. 26th edn. New York: McGraw-Hill Education.", "Cannon, W.B. (1932) The Wisdom of the Body. New York: W.W. Norton.", "Costanzo, L.S. (2022) Physiology. 7th edn. Philadelphia: Elsevier.", "Ferrier, D.R. (2021) Lippincott Illustrated Reviews: Biochemistry. 8th edn. Philadelphia: Wolters Kluwer.", "Hall, J.E. and Hall, M.E. (2021) Guyton and Hall Textbook of Medical Physiology. 14th edn. Philadelphia: Elsevier.", "Hodgkin, A.L. and Huxley, A.F. (1952) 'A quantitative description of membrane current and its application to conduction and excitation in nerve', The Journal of Physiology, 117(4), pp. 500-544.", "Marieb, E.N. and Hoehn, K. (2019) Human Anatomy and Physiology. 11th edn. Harlow: Pearson.", "Silverthorn, D.U. (2019) Human Physiology: An Integrated Approach. 8th edn. Harlow: Pearson.", "Tortora, G.J. and Derrickson, B. (2017) Principles of Anatomy and Physiology. 15th edn. Hoboken: Wiley.", "Vanderah, T.W. (ed.) (2024) Katzung's Basic and Clinical Pharmacology. 16th edn. New York: McGraw Hill."] for r in refs: p=doc.add_paragraph(r); p.paragraph_format.left_indent=Inches(0.4); p.paragraph_format.first_line_indent=Inches(-0.4) # page numbers fp=doc.sections[0].footer.paragraphs[0]; fp.alignment=WD_ALIGN_PARAGRAPH.CENTER run=fp.add_run() for typ,txt in (("begin",None),(None," PAGE "),("end",None)): if typ: e=OxmlElement("w:fldChar"); e.set(qn("w:fldCharType"),typ) else: e=OxmlElement("w:instrText"); e.set(qn("xml:space"),"preserve"); e.text=txt run._r.append(e) out="/tmp/workspace/homeostasis-report/Nervous_Endocrine_Homeostasis_Report.docx" doc.save(out) caps=["Figure 1","Figure 2","Figure 3","Figure 4","Figure 5","Figure 6","Figure 7"] txt=" ".join(body) wc=len(re.findall(r"\S+",txt)) print("body words (incl headings, bullets, table, captions of figs 1-7):",wc) EOF python3 build.py

Running Command

ls -la /tmp/workspace/homeostasis-report/; python3 -c " from docx import Document d=Document('/tmp/workspace/homeostasis-report/Nervous_Endocrine_Homeostasis_Report.docx') print(len(d.paragraphs), len(d.inline_shapes), len(d.tables))"

I've written the full report as a Word file with all eight figures, including the flow chart. I haven't opened the file in Word to check how it paginates. I can't submit anything to Turnitin for you, so you'll need to upload the report and the brief yourself.

Nervous Endocrine Homeostasis Report

Word Document · DOCX

What the report covers
SectionContent
1. IntroductionWhy the body needs stable conditions, and what the report covers
2. A.C. 1.1Definition of homeostasis, negative feedback, and thyroid hormone control (Figure 1, labelled)
3. A.C. 1.2Withdrawal reflex showing sensory, relay and motor neurones (Figure 2, reflex arc)
4. A.C. 1.3Five steps of the action potential (Figure 3) and synaptic transmission (Figure 4)
5. A.C. 2.1Labelled endocrine diagram (Figure 5) and Table 1 matching glands to secretions
6. A.C. 2.2Steroid and thyroid hormone action at the nucleus (Figure 6)
7. A.C. 2.3Positive feedback using oxytocin in labour (Figure 7)
8. A.C. 3.1Blood glucose regulation (Figure 8, flow chart showing the nervous and endocrine roles)
9. Conclusion and referencesConclusion, then a Harvard reference list of 10 sources
Table 1 matches
GlandMain secretion
PituitaryProlactin
ThyroidThyroxine
ThymusThymopoietin
AdrenalAldosterone
PancreasGlucagon
TestisTestosterone
OvaryProgesterone
PinealMelatonin
Before you submit
  • Word count: The body text is about 1,204 words, counting headings, bullets, the table and figure captions. The flow chart and reference list are excluded. This is inside your 1,300 words plus or minus 10% (1,170 to 1,430), with room to add a little.
  • Endocrine diagram: I couldn't see the diagram in your brief, so I drew my own labelled version (Figure 5). Label the brief's diagram too if your tutor wants that one.
  • References:
    • I cited the textbook editions from memory and left out page numbers. Check each edition, year and publisher against your library copy.
    • The textbook search in the medical library also supported the points on negative feedback, action potentials and steroid hormone receptors.
    • A quick PubMed search for recent reviews found nothing relevant to this topic. Nothing contradicts the textbook content.
    • Adding one or two journal articles would help your marks, since the brief asks for varied sources.
  • Your details: Replace the placeholders for name, student ID, unit and date on the title block.
  • Originality: The figures are my own schematics, not copied from books. Write the explanations in your own words where you can, so the Turnitin similarity score stays low.
This is a shared conversation. Sign in to Orris to start your own chat.