24-Biorhythms-And-Arrays

24-Biorhythms-And-Arrays - CS106X Winter 2008 Handout 24...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS106X Handout 24 Winter 2008 February 6, 2008 Biorhythms And Arrays Illustrating Simple Arrays The program we want to write to provide the above drawing of your mental, physical, and emotional biorhythms isn't all that challenging if you make the effort to write generic initialization and plotting routines. We’ll leverage off of the introductory array material addressed in lecture, and use arrays instead of Vector s, because we know the size of all arrays up front and they never change. static const int NumDaysToPlot = 60; static const int PhysicalPeriod = 28; static const int MentalPeriod = 33; static const int EmotionalPeriod = 17; static const string PhysicalColor = "Blue"; static const string MentalColor = "Green"; static const string EmotionalColor = "Red"; static const double DayCircleRadius = 0.05; void InitBioWave(double wave[], int waveSize, int period); void PlotBioWave(double wave[], int waveSize, string color); void DrawCenteredCircle(double radius, double cx, double cy);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2008 for the course CS 106X taught by Professor Cain,g during the Winter '08 term at Stanford.

Page1 / 2

24-Biorhythms-And-Arrays - CS106X Winter 2008 Handout 24...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online