How to Model Your Own Iris in Excel

The human eye is completely fascinating! Just the iris is comprised of two different sets of muscles that retract/dilate the pupil and relax/close it, allowing more or less light to hit the retina at the back of the eye. In closeup photos...

Part 1 of 6:

Preparation

  1. Open a new Excel workbook and prepare 2 worksheets:
    1. Either click on the green "X" icon, or double-click on Excel in the Microsoft Office folder in your Applications folder by opening a Finder window, in order to start Excel;
    2. Using the File menu or the icon, Open a new workbook;
    3. Save the workbook as "Model Your Own Iris In Excel" into a logical folder, such as "wikiHow Articles" or "MS XL Imagery";
    4. Create via the + button at the bottom or access the second worksheet tab and double-click edit-name it "Saves" -- this will be used to Paste Values and Charts to which you wish to keep and remember, while still having the top worksheet tab for doing the main work on -- if you were to copy and paste, the formula results would change with varying inputs on the top worksheet from the Defined Named Variables, which are global;
    5. Double-click on the first leftmost worksheet tab and edit-name it "Circle Data and Chart" (w/o quotes).
  2. Set Preferences:
    1. Be mindful that these settings will affect your future XL work;
    2. General - Set Show this number of recent documents to 15; set Sheets in new workbook to 3; this editor works with Body Font, in a font size of 12; set your preferred file path/location;
    3. View - Check Show formula bar by default; check Indicators only, and comments on hover for Comments; show All for objects; Show row and column headings, Show outline symbols, Show zero values, Show horizontal scroll bar, Show vertical scroll bar, Show sheet tabs;
    4. Edit - Check all; Display 0 number of decimal places; set Interpret as 21st century for two-digit years before 30; Uncheck Automatically convert date system;
    5. AutoCorrect - Check all
    6. Chart - In Chart Screen Tips, check Show chart names on hover, and check Show data marker values on hover; leave the rest unchecked;
    7. Calculation - Automatically checked; Limit iteration to 100 Maximum iterations with a maximum change of 0.0001, unless goal seeking (which is not anticipated for this project), then .000 000 000 000 01 (w/o spaces); check Save external link values;
    8. Error checking - Check all and this editor uses dark green or red to flag errors;
    9. Save - Check all; set to 5 minutes;
    10. Compatibility - check Check documents for compatibility
    11. Ribbon - All checked, except Hide group titles is unchecked.
Part 2 of 6:

The Tutorial

  1. If you have completed the article Create a Sin and Cos Circle in Excel you can copy whole sections of it onto the following worksheet, being careful to re-name your various Defined Variable Names.
  2. Enter the Pupil Circle (this is the Inner Pupil Circle where the fibers bind to each other)
    1. Enter into cell A1, Pupil Circle, and Format Cells Font Underline and Bold it;
    2. Enter into cell A2, Cos;
    3. Enter into cell B2, Sin;
    4. Enter into cell G20, ShrinkExpand2;
    5. Enter into cell H20, 1.5; (the Pupil Circle formula depends on this)
    6. Enter into cell G21, X Offset2;
    7. Enter into cell H21, 5; (the Pupil Circle formula depends on this)
    8. Enter into cell G22, Y Offset2;
    9. Enter into cell H22, 5; (the Pupil Circle formula depends on this)
    10. Select cell range H20:H22 and Format Cells Font Red, Fill Yellow;
    11. Select cell range G20:H22 and Format Cells Border Outline External Thick Red;
    12. Still selecting cell range G20:H22. do Insert Names Create in Left Column.
    13. Enter into cell A3 the formula, w/o quotes, "=X_Offset2+COS((ROW()-3)*PI()/180)*ShrinkExpand2";
    14. Enter into cell B3 the formula, w/o quotes, "=Y_Offset2+SIN((ROW()-3)*PI()/180)*ShrinkExpand2";
    15. Edit Go To cell range A3:B363 and do Edit Fill Down;
    16. Start with row 5, and for every 3rd row thereafter (8, 11, 14 ... perhaps as far down as 92) do Format Cells for columns A and B Font Red, Bold.
  3. Format worksheet numbering
    1. Select the entire worksheet by selecting the blank "cell" above the 1 of Row 1 and to the left of Column A, and Format Cells Number Number Custom +0.0000;-0.0000;=0.0000
    2. Select Row 1 and Format Cells Number Number Custom 00;
    3. Select cell range E15:E363 and Format Cells Number Number Custom 000;
    4. Select cell range G15:H15 and Format Cells Number Number Custom 000.
  4. Enter Black Circle [Series 1] headers and formulas
    1. Enter into cell C1, 1;
    2. Enter into cell D1, BlackCircle; (this is the outer back pupil circle);
    3. Enter into cell C2, Cos;
    4. Enter into cell D2, Sin;
    5. Enter into cell G16, ShrinkExpand;
    6. Enter into cell G17, X Offset;
    7. Enter into cell G18, Y Offset;
    8. Enter into cell H16, 5; (the BlackCircle formula depends on this)
    9. Enter into cell H17, 5; (the BlackCircle formula depends on this)
    10. Enter into cell H18, 5; (the BlackCircle formula depends on this)
    11. Select cell range H16:H18and Format Cells Font Red, Fill Yellow;
    12. Select cell range G16:H18 and Format Cells Border Outline External Thick Red;
    13. Still selecting cell range G16:H18. do Insert Names Create in Left Column.
    14. Enter to cell C3 the formula, w/o quotes, "=X_Offset+COS((ROW()-3)*PI()/180)*ShrinkExpand"
    15. Enter to cell D3 the formula, w/o quotes, "=Y_Offset+SIN((ROW()-3)*PI()/180)*ShrinkExpand"
    16. Edit Go To cell range C3:D363 and do Edit Fill Down;
    17. Start with row 5, and for every 3rd row thereafter (8, 11, 14 ... perhaps as far down as 92) do Format Cells for columns C and D Font Bold;
    18. Enter 13 to cell E15 and Edit Go To cell range E15:E363 and do Edit Fill Series (accept default step value = 1), OK. Go down and check the values in row 363; they should be: A363: +6.5000; B363: +5.0000; C363: +10.0000; D363: +5.0000; E363: 361. These should duplicate the values in row 3, with the exception of column E.
  5. Create the Basic Chart
    1. Edit Go To cell range C3:D363 and do menu item Insert Chart or select Charts from the Ribbon, All, Scatter, Smoothed Line Scatter -- a chart should appear atop your worksheet -- resize it to fit into I16:P47 and pull the Plot Area open until it's about 1/2" from each side of the external border. Choose a pattern for your Chart Area Fill -- water droplets texture may go nicely with an eye.
    2. Double-click on the series plot of the circle and Format Data Series Line Weight 25, Gradient 79% Black and 100% White.
    3. Double-click in the Plot Area and Format LINE Line Weight .75, Gradient Radial Upper Left Corner: 0% Black, 100% Purple.
    4. Do Gradient Radial Centered for the FILL, 5% Black, 16% Med. Purple, 20% Black, 76% White, 83% White (establishes tight cutoff - less blur), 86% Dark or maroon Red, 97% Dark Orange to Red. The medium purple is to represent the behind-the-scenes second layer of iris fibers. It would be better to have an entire data section devoted to this second layer.
Part 3 of 6:

Data Sections for the Iris Fibers

  1. Decide the style you want: thin fiber style or blocks style (extra wide line thicknesses).
  2. Decide whether you will have just the front group of fibers, or both front and back groups and, if so, how detailed the back group needs to be. In this example, it is not very detailed, just a band of light purple-grey-rosish color bordering the center of the pupil.
  3. Decide if you need an "exploding flower" as part of your design -- if so, research the designs of the Eggies Spiritual Adventures series of articles written by xhohx and you will find a rose pattern with a hole in the center to get you started -- try Create a Dakini and Boddhisattva Aspect of the Mother Planet or see the Related wikiHow below.
  4. Decide how many fibers you want per quadrant -- this example uses 30 per quadrant of 90 degrees, or 120 in all 4 quadrants of 360 degrees.
    1. Type :SERIES: into cell F1. It refers to the Row 1 numbers which correspond to the Series numbers Excel assigns to each data series it charts. Note that Series 01 has already been assigned to the Black Circle. Do Format Cells Font Red Bold, Fill yellow, Border heavy red outline bold to cell range E1:F1.
    2. Enter to cell E2 St Radius x (for StartRadius X-axis point);
    3. Enter to cell F2 St Radius y;
    4. Enter End Radius x to cell E3;
    5. Enter End Radius y to cell F3;
    6. Do Format Cells Border Bold Red Outline Box around cell range E2:F3;
    7. Enter Degrees to cell F4;
    8. See the data chit diagram "Worksheet Setup" to follow along herewith:
      Picture 1 of How to Model Your Own Iris in Excel
    9. Shrink the image "Blue eye Streams Lrg" by grabbing the corner handles when the mouse hovers over the corners and turns into a double-headed arrow (or whatever image you are using as a reference) until it fits in approximately G23:H34;
      Picture 2 of How to Model Your Own Iris in Excel
    10. Build the following image, or one of your own iris, or another of your choosing, and fit it to I16:P46 (approximately);
      Picture 3 of How to Model Your Own Iris in Excel
      or use this one, "Iris by CG w Inner 2nd Fiber Layer" as a reference guide;
      Picture 4 of How to Model Your Own Iris in Excel
    11. Enter to cell E5, STARTPT;
    12. Enter to cell F5, 0; Do Insert Name Define STARTPT for Row 5;
    13. Enter to cell E6, =PI()/2; (=1.5708; this makes for a bit of a bump in the curve, because
    14. Enter to cell E7, 1.38308755426849; (... this value is a bit less, while ...
    15. Enter to cell E8, 1.91293118277239; (... this value and the succeeding ones are greater).
    16. Enter to cell E9, 2.64575131106459;
    17. Enter to cell E10, 3.65930571002297;
    18. Enter to cell E11, =2*PI(); (=6.2832)
    19. Enter to cell E12, 7 --- some of the above values were obtained via a Growth Trend Series from 1 to 7, that was later adjusted;
    20. Enter to cell E13 ENDPT;
    21. Enter to cell E14 DIFF;
    22. Do Insert Define Name Pieces to ='Circle Data and Chart'!$E$6:$E$12
    23. Do Format Cells Number Number Custom for cell range E6:E12 "Piece "0.0000
    24. Do Insert Name Define DIFF to Row 14, or ='Circle Data and Chart'!$14:$14
    25. Enter to cell F13 60 and Insert Define Name ENDPT to cell $F$13. Many different numbers of total degrees were tried, including 720, 360, 540, 180, 270, 90, 45, 80 -- and 60 was arrived at as looking most acceptable when there were but few iris fibers to try on;
    26. Enter to cell F14 the formula, =(ENDPT-STARTPT)/7; (using this difference, the increment is built) ...
    27. Enter to cell F6 the formula, =DIFF*Pieces, copy it, and paste it to F7: F12; the results you should have in cells F6:F12 are +13.4640;+11.8550;+16.3966;+22.6779; +31.3655;+53.8559;+60.0000 For cell range F5:F14 Format Cells Font Red and for cell range E4:F14 Format Cells Border Red Bold Outline and Fill yellow.
  5. Do Data Series 2 and chart it:
    1. Using the Command key between selections and the Shift key within selections, select cell ranges G1:H1, G2:H3 and G4:H14 simultaneously and do Format Cells Border Red Bold Outline per section.
    2. Enter 2 to cell G1; (this stands for plot series #2 and is the first iris fiber)
    3. Enter =$A5 to cell G2, =$B5 to cell H2, =$C5 to cell G3 and =$D5 to cell H3 --- notice that these are the cells we made red and black bold before in column A. Do Format Cells Font Red, Bold for cell range G2:H2 and Font Black, Bold for cell range G3:H3;
    4. Enter Cos+DIFF to cell G4 and (DIF*pc)*sin(deg*adj) to cell H4;
    5. Enter =G2 to cell G5 and =H2 to cell H5;
    6. Enter =G5+DIFF to cell G6 and =STARTPT+(DIFF*Pieces)*SIN((Degrees)*PI()/180) to H6;
    7. Copy G6:H6 and paste them to cell range G7:H12;
    8. Enter =G3 to cell G13 and =H3 to cell H13; for cell range G13:H13 do Font Bold.
    9. Enter =(G13-G5)/7 to cell G14 and =(H13-H5)/7 to cell H14;
    10. Do Format Cells Fill yellow for cell range G14:H14 (so you will NOT chart it because the DIFF is NOT the Endpoint!);
    11. Enter 3 to cell G15;
    12. Tap within the circle on the chart to select the plot area and do menu item Chart Add Data. Select cell range G5:H13 in response to the Query Box that arises. Do not be alarmed if the results are wrong. There may be two lines, one of which is extra. Find, by tapping on each series plot, between the two the one which ends with ...$H$5:$H$13,2) because that's the one you want and the other one is to be deleted. Correct in the formula bar the beginning of the series to $G$5:$G$13 from the C's or whatever it was in error. The line should plot now at about the 3 PM position in approximately a straight line with a bend at the end. Do Format Series and select the Line width to be 1 or .75 (at most 2), the Glow to be 2 and 50% and choose the color gradients of blues or browns or whites at the tips -- whatever your model picture shows in that position, OK;
  6. Do Data Series 3:
    1. Copy G1:H15 and paste it to I1;
    2. Change I1's cell contents to =G1+1; (so that it automatically increments to 3)
    3. Increase by 3 each of the references in cells I2:J3 -- this is most quickly accomplished by selecting cell range I2:J3 and doing Edit Replace 5 with 8, All, OK.
    4. Change J4 to the briefer (D*pc)*sin(º);
    5. Change I15 to =G15+3; Go back and change G15 to 5. This will cue you as to the row number to use in the top section, e.g. in I2:J3 -- (the 3 was used to keep track of numbers of lines plus glow lines already added previously)(in truth, however, often a line thickness of .75 or 1.75 was used simply because 3.75 was the default, and 1 + 2 glow lines had not been figured out yet until it was seen that the center pupil was not coming out as a near-perfect circle at all, due to such variations as line thickness and glow variances -- much re-tracing of steps was done; an error which you hopefully needn't repeat);
Part 4 of 6:

Do Data Series 4 to 120 and Chart

    1. Copy I1:J15 and paste it to K1, then copy I1:L15 and paste those two series to M1, bringing your total to 4. Keep doubling in this way until you reach 128 and stop and trim off until the total number of data series, including 2, is 240 columns (120 series of x's and y's).
    2. Do Edit Replace routine per row 15, without any errors, for rows 2 and 3 -- for example, if in Row 15 column G, there is a 5, then replace the common row number in cell range G2:H3 with 5, Replace All, OK; do that for every single series, all the way across!
    3. Construct the chart carefully by selecting the cell range to chart of G5:H13, or I5:J13 for the next series, etc, all the way across, and patiently as per the above step(s); it was found that 30 data points took about 2 hours to do, so the whole chart took 8 hours over 2 days to complete, prior to error cleanup; here is an example of a gradient as you must set the line width and gradient by clicking on the series plot each time you chart a series, all the way across! Remember line width should be .75 to 2 and the gradient and glow size and transparency percentage are set individually per iris fiber in accordance with your individual pupil photo you're copying, but generally should remain constant or the pupil will not come out a nearly perfect circle. The Modifier formula also bears on the situation, so keep that difference pretty tiny, like 1.007 vs. .993, for a total difference of .014, or less. Generally speaking, this author thinks a change of .005 is visible, but is not sure exactly. Visual acuity varies between individuals. On the other hand, Excel has set the minimum line weight at .25, which is definitely thicker than their glow or transparent objects. The situation pictured below, of an imperfect circle, was corrected by keeping glow size to 2 and transparency to 50%, constantly. Otherwise, it is a Gradient Example.
      Picture 5 of How to Model Your Own Iris in Excel
    4. Here is an example of a data chit reconciliation for columns A:D -- just making sure everything was on track;

      Picture 6 of How to Model Your Own Iris in Excel
      A281 to D281 example
Part 5 of 6:

Add Photo Lamp Reflection

    1. Find a picture like the following one, "Reflection Candidate", and cut out the background in Excel using Format Picture. Make it semi-transparent, and change the color to White (and it's best to start with a white object in this author's opinion); place it on the main chart;
      Picture 7 of How to Model Your Own Iris in Excel
    2. Hold down the Shift Key and do Copy Picture to your Saves worksheet where you will again hold down the Shift Key and do Paste picture. Your picture should resemble the one below but if the reflection doesn't show, even though you've grouped it with the chart, then try Grabbing the Image and exporting a jpg from Preview:
      Picture 8 of How to Model Your Own Iris in Excel
Part 6 of 6:

Helpful Guidance

  1. Make use of helper articles when proceeding through this tutorial:
    1. See the article How to Create a Spirallic Spin Particle Path or Necklace Form or Spherical Border for a list of articles related to Excel, Geometric and/or Trigonometric Art, Charting/Diagramming and Algebraic Formulation.
    2. For more art charts and graphs, you might also want to click on Category:Microsoft Excel Imagery, Category:Mathematics, Category:Spreadsheets or Category:Graphics to view many Excel worksheets and charts where Trigonometry, Geometry and Calculus have been turned into Art, or simply click on the category as appears in the upper right white portion of this page, or at the bottom left of the page.
Update 05 March 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile