190 likes | 432 Views
Dr. Niels Lobo Computer Science. Using the Geometric Sequence Macro in ImageJ. Outline. Geometric Sequence Using the GP Macro GP in ImageJ. Geometric Sequence.
E N D
Dr. Niels LoboComputer Science Using the Geometric Sequence Macro in ImageJ
Outline • Geometric Sequence • Using the GP Macro • GP in ImageJ
Geometric Sequence A geometric sequence (also know as geometric progression) is a sequence in which each term after the first is found by multiplying the pervious term by a constant, r, called the common ratio. Example: 2, 6, 18, 54, ... Has the common ratio of 3 An+1=rAn A0 –scale factor r – common ratio Note: In your own time check Wikipedia.org and check that Geometric Progression and Geometric Sequence are the same things.
Geometric Sequence Question Question: What is the common ratio in this geometric sequence: 5, 25, 125, 625, 3125 … A. 3 B. 5 C. 15
Geometric Sequence Practical application – photographer prints pictures. She charges families $10 per square inch of the photo paper used, because she only has limited supply of paper.
Area as a Geometric Sequence Suppose the available sizes are: 2x2,4x4,8x8, etc. Both sides increase geometrically in length What about the area ? 2x2=4, 4x4=16, 8x8=64, 16x16=256 The area also grows geometrically ! Wow.
Area as a Geometric Sequence For those of you mathematically inclined: An+1=pAn Bn+1=qBn An+1 Bn+1=(pq) An Bn The common ratio of the area is pq, where p and q are common ratios of the sides ! Wow.
Area as a Geometric Sequence Homework: Suppose the sizes are 2x2, 6x4, 18x8, 54x16,… An+1=3An Bn+1=2Bn What is the common factor of An Bn ?
Perimeter as a Geometric Sequence Suppose now our photographer also charges $100 per one inch of the photo frame (she is a perfectionist and an expensive one to work with !) The charge is proportional to the Perimeter of the photo. Available photo sizes still form a geometric sequence: 2x2,4x4,8x8. What about the perimeter ?
Perimeter as a Geometric Sequence Sizes are: 2x2, 4x4, 8x8,16x16, Perimeters are: 2+2+2+2 = 8, 4+4+4+4=16, 8+8+8+8 =32, 16+16+16+16 =64 Perimeter also forms geometric sequence. Wow !
Perimeter as a Geometric Sequence Perimeter grows geometrically with sides. What is the common factor ? A,B – sides p – common factor P - perimeter An+1=pAn Bn+1=pBn Pn+1 = 2(An+1+Bn+1)=2pAn +2pBn=pPn The common factor of the perimeter is the same as the common factor of the sides. Wow !
Using the GP Macro • Open ImageJ • Go to plugins> macros> run…
Using the GP Macro • Select 111GP.txt • This will take you to My Pictures, select any picture you like.
Using the GP Macro • Now, press the space bar, and notice how the picture increases size:
Using the GP Macro • Notice also that the area of the picture that is highlighted increases as well:
Using the GP Macro As you keep clicking the space bar, it will eventually reach the end of the geometric sequence shown, and will prompt you for the area of the next number in the geometric sequence :
Using the GP Macro It is important to note that the cost of the paper increases, as the area of the image increases as a geometric sequence; when the length and width of the image is multiplied by the constant.
GP in ImageJ In these equations, the new width and height of the larger picture is calculated:
GP in ImageJ Question In this picture What is the area equal to?