Sine Wave Program In Java

This is a simulation of a ripple tank. The third try was a Java program that, had it not been for the recent Java applet "Perfect Storm" debacle, would have ended the series and I and others would have the handy tool I wanted. PSLab device is capable of generating sine waves with a very high accuracy using PSLab-firmware and a set of filters implemented in the PSLab-hardware. Ejs Harmonics and Fourier Series model was created using the Easy Java Simulations (Ejs) modeling tool. The wavelength is due to velocity/frequency, so if the frequency is low (50Hz), wavelength is about 6000km long. How to draw a sine and cosine wave? - Processing 2. wav synth 3 sine 440 sox -n sqr. Y = Amplitude * ( sin( Frequency * Ticks)) The amplitude is low because the sine waves produced are used for a particle engine. unit circle java – This images ideas was upload at 2017-03-21 by unit circle java Download other images about printable editable pdf unit circle 2017 in our unit circle java Ideas gallery including 20 different unique image. sin()method enables a sine value to be used in conjunction with animation. Java Graphics How to - Draw sine curve. You can have an arbitrary waveform generator (AWG) that outputs whatever waveform the user has defined, or you can have a function generator that outputs predefined signals like sine, square. You can select the whole cpp code by clicking the select option and can use it. This "height" of a point on a unit circle is known as the sine of the. As shown in the samples below, a naive rendering of a square wave will have noise and harmonic distortion, whereas a correct rendering sounds clean and undistorted. 5 A simple sound generating program in Java. cs namespace SineWaveTest {class Program {static void Main (string [] args). This sine wave generated again has a frequency of 262 Hz and a volume of 100. java # to compile $ java sinewave/Sine # to run the discrete sine wave $ java sinewave/SineContinuous # to run the continuous sine wave Questions & Comments If you have any questions or comments about the code don't hesitate to contact me at gavin. Like , Share and Subscribe. The freeware program CONVERT from KilletSoft converts… SyncDroid 1. The program should not terminate and should continuously scroll down the wave (except until it is somehow interrupted). Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. However, they will also work independently, assuming ownership for the design and programming of simple and complex tasks. Using the inputs from track bars of: Amplitude, Frequency, and Phase Change. This interactive tutorial explores the classical representation of an electromagnetic wave as a sine. It includes an SQL parser and generator. The sine wave formula is:. Mathematically, it provides some insight into the dynamics of the Sine - Gordon equation. 783326909627483 Sine of 1 is 0. It occurs often in pure mathematics, as well as physics, signal processing, electrical engineering and many other fields. It also covers a few scenar. When I draw it, the curve never comes out smooth, even with antialiasing turned on. Below is the syntax StdAudio. I have the Microchip, and the programmer. I am trying to sample a sine wave and plot it's frequency components, but I am having problems implementing it. There is no "crackling sound" in the loudspeaker when changing the frequency or volume. wav synth 3 square 440 sox -n saw. The processor on the Teensy also has access to the USB and can emulate any kind of USB device you need it to be, making it great for USB-MIDI and other HID projects. Neural networks can also build models for regression studies. b is the signal bias. Like , Share and Subscribe. If you see any errors or have suggestions, please let us know. Diane Craig demonstrates the art of the possible when using modern Java toolkits to build high quality, high performance applications for Science and Aerospace industries. This c programming code is used to find the sine wave peak value. parameters are frequency, frequency modulation, noise, phase, volume and wave type. You should contrast the behaviour of solutions to the heat equation with that of solutions to the wave equation. getSourceNum()); I'm trying to write a program that doesn't just calculate the peak of sine but also outputs the lower amplitude points on the sine wave to give a fairly predictable but uniform sequence. These examples are extracted from open source projects. Double clicking the ejs_ehu_oscillations_harmonics. Plotting points to create a Sine W. The essential condition is that A. Below is the syntax (sine wave) of the given // need to call this in non-interactive stuff so the program doesn't terminate // until all the. If you want to produce a graph of your sine wave, you can capture the full waveform in a buffer in memory, then use tools->graph in CCS to plot the waveform. Does someone know how to generate sine signal with cordic algorithm in VHDL? Hi, A part of my project in Signal Processing is to generate a sine signal with the cordic algorithm in VHDL and put. When I draw it, the curve never comes out smooth, even with antialiasing turned on. Keyboard and Mouse Events sourcecodesonline. TIME SERIES PREDICTION WITH FEED-FORWARD NEURAL NETWORKS. * * % java Histogram 50 1000000 * *****/ public class Histogram {private final double [] freq; // freq[i] = # occurences of value i private double max; // max frequency of any value // Create a new histogram. If you left off somewhere in the middle of a cycle at the end of the previous full buffer, you will get a glitch! James. Computer Graphics Programs with Computer Graphics Tutorial, Line Generation Algorithm, 2D Transformation, 3D Computer Graphics, Types of Curves, Surfaces, Computer Animation, Animation Techniques, Keyframing, Fractals etc. We will introduce quantum tomorrow and the waves will be wavefunctions. The ordinary and extraordinary light waves generated when a beam of light traverses a birefringent crystal have plane-polarized electric vectors that are mutually perpendicular to each other. When you click text, the code will be changed to text format. 1 Drawing a High-Resolution Sine Curve The program first creates a graphic window using the AdaGraph operation. It is named after the function sine, of which it is the graph. Think about the min and maximum range of a sine function. Declaration: double sin(double); C programming code. Creating a sine wave is useful for a number of things. The sine wave needs to be modifiable via two slider bars to increase it's frequency and height(?). draw a sine wave using jsp. The problem with this approach is that it is inefficient. A sine wave with an rms value of 12 V is riding on a dc level of 18 V. college library management system ppt download free. C library function - sin() - The C library function double sin(double x) returns the sine of a radian angle x. In Fourier Analysis we represent the complex wave shape as a sum of sine waves (or a sum of “partials”), each of a different amplitude. this my id [email protected]. It includes an SQL parser and generator. // This is a program that will get you what you need, which is a program // that can generate an output given an inputi. pls help me frds. A typical technique was to create a verticalo graph by spacing over on the screen, then displaying an *. You may also remember that sine and cosine are similar when you graph them, both forming periodic waves. What is the wavelength of sine wave? Given frequency, distance and time. In this article, we're going to explore a number of ways to calculate the sine series without actually using the sine (or cosine) function. Easily generate sine waves, sound frequencies or signals to create test tones or noise waveforms. Since the sampling rate is 16000 samples per second, 160 samples will contains 10 ms of data. The black section to the right, which covers most of the wave adder, is the graphing area where waves will be drawn, added, and subtracted. You should contrast the behaviour of solutions to the heat equation with that of solutions to the wave equation. Here's a C program to calculate the cosine series with output. C program to show use of switch case or Program to Calculate Grade of Student or C Program to Calculate Grade of Student or C Program To Find Grades Of A Student Using Else If Ladder or c program to find grade of a student using switch. The sine function, along with other trigonometric functions, is widely available across programming languages and platforms. Then, use nested for loops to print the elements in the corresponding order. The absolute value of the sine wave is only shown when the subsystem is executed. The sin() method returns the sine of a number. how to write a program graph function sinx? sine wave. So, the sine wave with the highest frequency has 500 peaks and 500 valleys in our 1000 samples, with every other sample being a peak. Sample Programs from Class (and a Few More) From class on 24 Oct: Examples--more on floating point; right shift operations on signed and unsigned ints; hex to binary via lookup table floatint. Csound is a computer programming language for sound, also known as a sound compiler or an audio programming language, or more precisely, an audio DSL. Sin & Cos: The Programmer's Pals! [email protected] Program /* This program is for numerical integration of numerical methods Here we are going to solve the integration of defined functio. The oscillating electric field vectors of the virtual electromagnetic wave are represented by blue lines, while the magnetic field vectors are depicted in red. Back in the day and on the very slow Commodore 64, calculating the sine wave live was too slow. ) We have this important trig test coming up and I need to master the drawing of sine and cosine waves. Easily generate sine waves, sound frequencies or signals to create test tones or noise waveforms. h header file and power function pow(i, j). k is a repeating integer value that ranges from 0 to p–1. A single arc forms each cycle on the time axis followed by a single arch below him. com courses again, please join LinkedIn Learning. java below plays an A for 2 seconds with maximum amplitude 8,000. [email protected] This new JAVA applet will be able to choose different wave forms such as triangular, sinusoidal and square waves. 1proj that is corrupted on my computer. Javatools that any Java project will find useful. Until now, we have built deep neural networks classifiers. Ignore the side-to-side component of the mark as the wheel spins and just look at the up-and-down motion. $ javac sinewave/*. Free, Simple and Easy to Use. of the sine wave/cyclic component and to extract the sine wave itself (scaled between -1 and 1) of a time series. WavReader library (uses objects for reading, but writeWav() is a static method) reader. sin() which are required to get the characteristic wave-like ascending and descending values of the sine wave. C program to draw cosine wave using graphics. Simple code. My thoughts so far: phase = -sin^-1(y) - wt + 2*pi*n, but I don't know how to easily fit this with two points. I am working on a function that will generate a sine wave at a given frequency AND sampling rate. But it not easy to find out the difference from. The result of taking 65536 samples of one cycle of a sine wave with max amplitude 1 and a frequency 100 can be seen below. 1 kHz sample rate". java class should look similar to the one below. I reckon I'll need to use a 'do' loop to generate all the points on the wave but I'm getting horribly stuck. A compiler which translate a program written in ". This is a question regarding C Programming: i am looking to generate audio using C Code. In this program, we will draw a horizontal cosine wave on screen of amplitude 50 pixels. ) If φ is positive then the wave is shifted to the left. Then, use nested for loops to print the elements in the corresponding order. A Beginners Guide and Tutorial for Neuroph. Circuit Simulator Applet. You can make this prettier in a lot of ways, like with RIFF header structs and less hardcodedness. wavfile: A Simple Sound Library wavfile is a simple sound library for use in CSE 20211. h header file to color a pixel at (x, y). When you click text, the code will be changed to text format. jar file will run the program if Java is installed. The Flash Animations were all taken from David M. At some point in the cycle, there has to be a point where there is zero pressure, just between the compression and the rarefaction. , but the point is that the derivative of a sine wave, is a sine wave, and that is found through the geometry of the circle and the right triangle. You can select the whole c code by clicking the select option and can use it. Every attribute in a SVG file can be animated by the user. Note: This method returns a value between -1 and 1, which represents the sine of the parameter x. Enter search criteria. Untranslated parts are still in English. If you haven't installed matlab on your system, you may wanna see my post about how to install matlab on linux. Now I try to use an easy way to generate the sine wave. Welcome to our you tube channel Programming knowledge. Returns one output value. It occurs often in pure mathematics , as well as physics, signal processing, electrical engineering and many other fields. I am working on a function that will generate a sine wave at a given frequency AND sampling rate. 71 kHz and 2. h header file and power function pow(i, j). Project 4 - Sound Player. George indique 2 postes sur son profil. It is a context for learning fundamentals of computer programming within the context of the electronic arts. C/C++ program to Sine Wave Using Graphicswe are provide a C/C++ program tutorial with example. That is why in signal processing, the Fourier analysis is applied in frequency (or spectrum) analysis. You can change the frequency with a slider. Sine Wave Generator. Here is a program of MAT LAB for displaying elementary signals like sine and cosine waves in continuous and discreet form. 841470984807896. Learn how to make waves of all different shapes by adding up sines or cosines. Neural networks have been applied to time-series prediction for many years from forecasting stock prices and sunspot activity to predicting the growth of tree rings. Sine Wave Program Before high resolution displays became common, computer terminals were often used to display graphs of equations using only text characters. Here's a C program to calculate the cosine series with output. A Beginners Guide and Tutorial for Neuroph. This computes a sine wave of infinite length at the specified frequency, and returns an infinite generator which samples the wave 44,100 times per second. Both waves must have same frequency. need to generate sine wave using C I am working on a project to code a program that generates sum of two sine waves of different freq,and has a sampling freq of 100khz(1 lac samples). You can select the whole java code by clicking the select option and can use it. Applications. An implementation of Cron and Crontab in java. An easy way to plot a sine wave in Matlab It is one of the easiest ways to plot a sine wave in Matlab. Sounds folder Bach vs Sine wave Midi sound maker applet BeatBox applet Rhythm exercise. Important thing is Data Structures. these videos are part of a challenge to upload one episode each day during august 2011. java * * This is a data-driven program. For the next and final tutorial in this series, the project is loaded as an App on an Android device and the fidelity of the wave examined through an oscilloscope. (Fast Fourier Transform) Written by Paul Bourke June 1993. Graph Wave Generator freeware for FREE downloads at WinSite. In Java language you can easily print number pattern using for loop and also using while loop, here i will show you in simple way to print these all patterns. An ideal, unmodulated wireless signal has a sine waveform, with a frequency usually measured in megahertz ( MHz) or gigahertz ( GHz ). Plot Graphs of Trigonometric Functions using Python Pylab, Python with NumPy, SciPy and matplotlib aims to provide a viable alternative to Matlab. 3, SGI IRIX, OSF/1, HP-UX with more to come. Sine waves are periodic functions, meaning that they repeat themselves after a certain period. These examples are extracted from open source projects. I'm trying to output a sine wave to line-out of my laptop soundcard, and then redirecting to line-in (microphone) via an audio cable. A sine wave voltage is applied across an inductor. In that FFT is used to find out the amplitude and frequency of input sine wave. When the value in the brackets equals 2π radians, the sin. *; import javax. *; import java. Across a shock wave, the static pressure, temperature, and gas density increases almost instantaneously. The modem receives a baseband signal of base and the module,. This code generate 256 sample points on one sine wave and write them to the DAC (MCP4802). This java programming code is used to find the sine wave peak value. Until now, we have built deep neural networks classifiers. To see if such a model could be fitted to the data I used the auto. A sudden reduction of entropy produces a character Lineus. ), refraction, resonance, phased arrays, and the Doppler effect. Sine, Cosine and Tangent in a Circle or on a Graph. You are to take samples at 100 Hz, 200 Hz, and 300 Hz. have only visible space notion Whatsapp Download For Samsung Wave 533 Gt-S5333 At the very least hook ur personal computer to a flatscreen directly. From Wikibooks, open books for an open world < Trigonometry. In Fourier Analysis we represent the complex wave shape as a sum of sine waves (or a sum of "partials"), each of a different amplitude. With the growing market of software synthesizers there is a staggering number of synthesis techniques being explored, giving a wide array of possible sounds. This c program code will be opened in a new pop up window once you click pop-up from the right corner. The program also uses C's math. So I need the actual coords from the sine wave signature. To set the number of cycles, we have created the following method:. discrete frequency sine-wave noise or single-point spikes) is there hope of anything close to complete noise elimination. ToneGen Audio Tone Generator can be used as a sine wave generator, sound frequency maker, or signal generator that can be used to create test tones, sweeps, and more. Machine language is a very simple language. Program /* This program is for the reflection and sharing of triangle. I write code for it , but it does not like moving or running sine wave graph. An implementation of Cron and Crontab in java. , centered on the horizontal axis). Put up a barrier to explore single-slit diffraction and double-slit interference. Plotting points to create a Sine W. Most methods involve some baseline wave and have a pattern to how the subsequent waves are combined. Get help from experts in C++, PHP, Visual Basic, HTML, CSS, JavaScript, Java. When I draw it, the curve never comes out smooth, even with antialiasing turned on. Registed user can get files related to this applet for offline access. Architect(Consumer Digital Products) Responsible for architecture, development, availability, and operations of my client’s various Consumer Digital Products - eCommerce Platform, Mobile Apps and Digital Assistants, which are used for generating lead and selling car subscriptions, accessories, leasing. The program also uses C's math. You can also plot more than one function on the same figure. This item: 400-Watt Sine Wave Inverter with UL, CSA Product Overview The KISAE 400-Watt true sine wave power inverter converts 12-Volt battery power into true sine wave AC household power in your truck, boat or RV. Jump to navigation Jump to search. For developing a small calculator program in swing we need two different classes. It draws a sine wave : 2D « SWT JFace Eclipse « Java It draws a sine wave : 2D « SWT JFace Eclipse « Java. It would consist of a Java Applet that makes sounds and displays the corresponding wave pattern on a simulated digital oscilloscope. Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts. The following are Jave code examples for showing how to use setTitle() of the javafx. I am am trying to generate a wave given user parameters. Basic Examples. java # to compile $ java sinewave/Sine # to run the discrete sine wave $ java sinewave/SineContinuous # to run the continuous sine wave Questions & Comments If you have any questions or comments about the code don't hesitate to contact me at gavin. java to create a visualization of the songs that you play. In my research, I have used Python to automate my calculations in physics and chemistry. h header file to color a pixel at (x, y). (Standing wave if plucked in middle, travel at end. From trigonometry, the sine of the cone angle mu is equal to the ratio of a and v: sin(mu) = a / v But the ratio of v to a is the Mach number of the flow. have only visible space notion Whatsapp Download For Samsung Wave 533 Gt-S5333 At the very least hook ur personal computer to a flatscreen directly. In most practical situations, a lone cosine wave is the same as a lone sine wave; phase generally has meaning only when two or more waves having identical frequencies are compared. Interactive Java Tutorials Polarized Light Waveforms. The following are Jave code examples for showing how to use setTitle() of the javafx. Represent the elements and topology of a supervised system as shared in-memory services with Rogue Wave Server. slice() method; Preventing validation on HTML5 text box; Draw a circle filled with random color squares on HTML5 canvas; Print a HTML5. pls help me frds. Common visualizations for signals and audio effects are created including: waveform, characteristic curve, goniometer, impulse response, step response, frequency spectrum, and spectrogram. These are very easy to use just like toys.             Let’s take a look at this circuit. 1000 Java Programs; Simple Java Programs; Java - Arrays; Java - Mathematical Functions; Java - Classes; Java - Collections; Java - Event Handling; Java - Exception Handling; Java - File Handling; Java - Inheritance; Java - Java. j a v a 2 s. Recursive function that counts number of times a perticular number appears in the given array C program to plot the sine wave using files. Graph Wave Generator freeware for FREE downloads at WinSite. When the second polarizer is parallel to the first polarizer, all light passing through the first polarizer also passes through the second. h header file to color a pixel at (x, y). The simplest sound in the world is a sine wave (Figure 1. If the wave shape is periodic, the frequencies of the partials are multiples of the fundamental frequency and are called the “harmonics” of the tone being played. The pattern like : 1 22 333 4444. value is a) 0. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology. Recreating this functionality in Java requires method overloading, optional classes or other additional programming logic. Download Sine Wave Using Graphics desktop application project in C/C++ with source code. my buffer length is 100 samples which is the precise amount needed to create 1 cycle of a 480Hz sine wave When i drop the input frequency in the sine formula, from 480Hz all the way down to 80Hz, the waveform changes from a sine wave at 480Hz, to almost a triangle wave at 240hz and then almost a perfect sawtooth wave at 80Hz!!. Also, when you say the sine wave is distorted, what sine wave are you talking about? Please clarify. I am am trying to generate a wave given user parameters. The spreadsheet pictured above, PeakAndValleyDetectionTemplate. Drawing a Sine Wave using Java Graphics [Swing] Now if sine [i] is -1, maxHeight = 500 pts [i] = -1 * 250 * 0. sine, square, or triangle) and shows their sum. Circuit Simulator Applet. 95 (which means 95%) + maxHeight / 2 = -237. Each biorhythm is a sine wave which represents the rise and fall of a specific human ability. Focused on generating Sine Wave using PWM from Microcontroller Project Bidirectional Inverter. // Time is not part of the user inputit is a constant. java: The cooling of a bar initially at 100 degrees when it its end are set to 0 degrees. about programming languages c and java; c # - about learning methods for general programming beginners; about c # learning method; c # - about learning methods for general programming beginners; c # - about assets used in unity tutorials; c # - about applicationdoevents c # - about the frequency of sine wave generation; c # - about unity script. Demo Program set 1: Oscillator and Mixer. To display -2Pi, use g. Sine wave, square wave, triangular waveform, saw tooth waveform, impulse, white noise and pink noise. The value passed in this function should be in radians. Programming 101 By Way of Java Sine Wave Graph: With Double Buffering This version of the sine wave graph applet uses double buffering; everything is drawn to an off-screen canvas, which is then copied to the actual window. That is, the sine wave will complete 400 cycles in 1 second. java, EchoFilter. Basically, I am creating a Java program to calculate sine wave regression equations, based on coordinate data (x,y from a data file or from user input). You can see that after rectification, the fundamental frequency is eliminated, and all the even harmonics are present. The Interference with Synchronous Sources model displays the interference pattern on a screen due to between one and twenty point sources. #2 Generating Sound - Sine Waves Philip Bohun Programming in Visual Basic. In this Quick Tip, I'll show you how to use the sine function to give your game's objects smooth back-and-forth motion - no more harsh zig-zags where your floating enemies seem to bounce against an. Quarter sine wave, or halved-half sine wave, or pulse sine wave, available in OPL2 and OPL3. You can get the size of buffer should be roughly half that of the sine wave file created in part 1. Phase shift keying encodes binary data by varying the phase of the signal to indicate a value. Most programming languages provide methods for computing the sine and the cosine values for an angle given in radians. This is the Triangle-to-Sine Converter circuit diagram with the detailed explanation of its working principles. First execute the program : java Sine >out. Question: Project #10 - 10. Special cases − If the argument is NaN or an infinity, then the result is NaN. And then write your code in the code box, You can use the auto complete snippets and warnings and errors which helps you to write better code faster way. It is also easy to create plots in MATLAB. write (byte[] audioData, int offsetInBytes, int sizeInBytes); to write the wave to a stream and audioTrack. Computers & Internet Programming & Design. I write code for it , but it does not like moving or running sine wave graph. These examples are running online through p5. Then I changed the code to use voltage mode instead of sine wave mode and just changing the voltage from +4V to -4V every time I play the next tone. // Time is not part of the user inputit is a constant. Here you will learn how to create Sine Wave. Amazon Services LLC Associates Program We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon. 1000 Java Programs; Simple Java Programs; Java - Arrays; Java - Mathematical Functions; Java - Classes; Java - Collections; Java - Event Handling; Java - Exception Handling; Java - File Handling; Java - Inheritance; Java - Java. Java Programming Examples. When the value in the brackets equals 2π radians, the sin. of the sine wave/cyclic component and to extract the sine wave itself (scaled between -1 and 1) of a time series. The normal output of the AD654 is an open collector digital square wave signal. Both waves must have same frequency. Create Sine Wave In this section, you will learn how to create a Sine Wave using Java Swing Mysql Math Function in set (0. In the mean time I can yet run them on an old Windows 98 computer. File logging and assert classes. Basic idea: Build a sine wave If we want a 440 Hz sound wave, then we need one of these cycles every 1/440th of a second. Java Sound, Creating, Playing, and Saving Synthetic Sounds or a Java program such as the program named AudioPlayer02 that I The frequency of the sine wave. My course homework is about draw sine wave and I must do this in java. h header file In this program, we will draw a horizontal sine wave on screen of amplitude 50 pixels. In addition to generating the sine wave in this function it also fills up the byte array buffer with the generated values. The results were not very satisfying. If you left off somewhere in the middle of a cycle at the end of the previous full buffer, you will get a glitch! James. A typical technique was to create a verticalo graph by spacing over on the screen, then displaying an *. When I try to run a java program (written using NetBeans) from the command prompt, the program opens in NotePad but does not run. also, I think that generation of points for the waveform must be happening in a seperate thread. Here’s the page we think you wanted. The Simple Signal Generator is a C# class designed to generate four simple periodic waveforms including sine, square, triangle, and sawtooth. For example, if you wear a pair of headphones and one side is playing a 440Hz tone and the other side is playing a 450Hz tone you will actually hear a third tone that is the difference of the two frequencies. * The frequencies are kept in an instance-variable array, and * an instance variable max tracks the maximum frequency (for scaling). java StdAudio. Interactive Unit Circle. But when an object moves faster than the speed of sound, and there is an abrupt decrease in the flow area, shock waves are generated in the flow. You should contrast the behaviour of solutions to the heat equation with that of solutions to the wave equation. Print a continuous sinusoidal wave scrolling vertically on a terminal. java # to compile $ java sinewave/Sine # to run the discrete sine wave $ java sinewave/SineContinuous # to run the continuous sine wave Questions & Comments If you have any questions or comments about the code don't hesitate to contact me at gavin. Below is the syntax highlighted version of PlayThatTune. In this video program for generation of sine wave is explained. java * * This is a data-driven program. 5 Imax b) 0. Write a C++ program to generate the sampled values of x(t), y(t), and z(t) at the sample rate of 0. Here is the video for sine and cosine graph in Java appletviewer. Where I would like to be able to change n to increase/decrease the number of cycles and change the amplitude A. But it not easy to find out the difference from. This java programming code is used to find the sine wave peak value.