Chapter - 4 : Generating 2-D trigonometric functions and its visualization.


We are familiar with one dimensional trigonometric functions like sine and cosine functions etc. There is another set of functions called two dimensional trigonometric functions, which most of us are not familiar with. These functions are very important in many image processing applications. This exercise helps us to create such functions and to visualize them. A big difference from the one dimensional trigonometric function is that, it has two frequencies, one along the X-axis and the other along the Y-axis. In addition we can have sine and cosine waves in the same 2-D trigonometric function, i.e. in one axis we may see 3 sine waves and 2 cosine waves along the other.
We are creating such functions by using the concept of outer product. Here we multiply two vectors of size and we get a matrix of size . This matrix produces the required trigonometric function. A plot of these values are given in each sheet for visualization purpose.
Excel Implementation.
We use the following inbuilt functions to find the sine and cosine values.
SIN():This function returns the sine value.
COS():Similarly returns the cosine value.
RADIANS():Returns the angle in radians for the input is in degrees.
ROW():Returns the row number of the cell.
COLUMN():Returns the column number of the cell.
The steps involved in the excel implementation are given below. We use the first sheet as example.
Step 1: Click on cell A5 and type the following expression =COS(RADIANS((ROW()-5)*10)).
Step 2: Similarly type the expression =COS(RADIANS((COLUMN()-2)*10)) in the cell B4.
The expressions return the cosine values for the 0 degree angle in both the cases.
Step 3: Click on the cell A5 and drag down till A41. This produces one cycle of cosine values.
Step 4: Click on the cell B4 and drag right till AL4. This produces the second set of values.
If we want to produce two cycles replace 10 by 20 gives the effect of multiplying by 2.
Step 5: Click on cell B5 and type the expression =$A5*B$4. Click on the small black box on the right-bottom of the cell and drag right and downwards to create the 37 by 37 matrix.
The above step performs the outer product operation.
Step 6: Now click on cell B5 and drag till cell AL41 to select the 37 by 37 matrix. Now go to the insert tab and from other charts choose 3-D Surface to get the visualization of trigonometric function.
The 37 by 37 matrix has the required function values.
Step 7: You can repeat this for different combinations of sines and cosines and different number of cycles.
Explain How to view it
Figures Here
Draw a dependancy diagram
Create Two diensional Exponential functions
Take functions from Matlab(by rudrapratap) and Plot
Plot also parametric functions

No comments:

Post a Comment