[Exercises]
[Workspace]
Purpose:
Generation of 1D and 2D sinusoidal waves are essential for the creation of test patterns, color maps, filter kernels, etc., and can be used in either the frequency domain. The purpose of this lab is to create 1D and 2D sinusoidal data sets.
Activities:
-
Use the operator Sinusoid to generate 1D sinusoidal data sets. Displaythe data sets using the Display 2D Plot operator.
-
Use Sinusoid to generate a 1D sinusoidal data set with the following
parameters:
Amplitude = 1,
Length = 50,
Number of Cycles = 3 (or Period = 50/3 pixels)
Phase = 0.
Display the data sets using the Display 2D Plot operator. This can be
accomplished by selecting the following operator:
-
Glyphs:Input/Output:Generate Data:Sinusoid
-
Glyphs:Visualization:Plot Display:Display 2D Plot
-
Open the Sinusoid pane and set the following parameters:
"Width" = 50 (all other dimensions = 1)
"Amplitude" = 1.0
"Number of sine waves along Width" = 3
"Width Phase Offset" = 0.0
-
Connect Sinusoid to Display 2D Plot and run the workspace.
-
The plot that initially displayed in the Display 2D Plot window is a line
plot. Select the "Options" menu in the plot window and change the
"Plot Type" to "Discrete".
-
Generate and plot a 1D maximum period wave.
-
Select and duplicate the Sinusoid and Display 2D Plot operators from part 1.
-
Open the Sinusoid pane and change the "Number of sine waves
along Width" to 1
-
Run the operators, and view the data as a discrete plot
-
Generate and plot a 1D minimum period wave.
-
Select and duplicate the Sinusoid and Display 2D Plot operators from part 1.
-
Open the Sinusoid pane and change the "Number of sine waves
along Width" to 25, and the "Width Phase Offset" to 90.
-
Run the operators, and view the data as a discrete plot
-
Use Sinusoid to generate 2D sinusoidal data sets. Visualize the
data sets using the Display Image operator. Use the Extract
and Display 2D Plot operators to examine the width and height
components of the function separately.
-
Generate a 2D sinusoidal data set with parameters set such that
it creates a diagonal sinusoidal pattern. Visualize the data using
the Display Image operator. Extract the first row and column
of data, and plot the data with the Display 2D Plot operator.
-
Glyphs:Input/Output:Generate Data:Sinusoid
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Glyphs:Data Manip:Size & Region Operators:Extract (2 of these)
-
Glyphs:Visualization:Plot Display:Display 2D Plot (2 of these)
-
Open the Sinusoid pane and set the following parameters:
Amplitude = 1,
Width Parameters: Width = 200,
Number of Cycles = 10,
Phase Offset = 45 degrees
Height Parameters: Height = 100,
Number of Cycles = 5,
Phase Offset = 90 degrees
-
Connect Sinusoid operator to the Display Image, and run those
two operators.
-
Connect the output of Sinusoid to the inputs of the two Extract
operators. Set up one Extract to extract the first width of data, and
theother to extract the first height of data.
-
Connect the Extract operators the Display 2D Plot operators, and run
them. View the plots as discrete plots.
-
Use the existing 2D sinusoid generation network to generate and
visualize a maximum period 2D-wave.
-
Open the Sinusoid pane and change the "Number of sine waves
along Width" to 1, and "Number of sine waves along Height" to 0. Set
all "Phase Offsets" to 0.
-
Run the network
-
Use the existing network to generate and visualize a minimum
period 2D-wave.
-
Open the Sinusoid pane and change the "Number of sine waves
along Width" to 100, and "Number of sine waves along Height" to
50. Set the "Width Phase Offset" to 90.
-
Select Glyphs:Visualization:Non-Interactive Display:Display Zoom Image from the cantata menu and connect the output
of Sinusoid to the input of Display Zoom Image
-
Run the network
-
When the zoom window comes up, select the "Options" button and
change the "Zoom Factor" to 8 to better visualize the pattern created
by the minimum period wave.
Exercises
-
Why does the maximum frequency not depend on the data dimensions?
-
What happens if a frequency larger than the maximum (1/2) is specified?
-
Why was a phase parameter of 90 degrees used to generate the maximum frequency signal?
Khoros Workspace
Execute the visual program c2s2sinusoids.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved