[ Prev | Index | Next ]
Japanese English
Now Loading...
Download
Please download on PC (not smartphone) and extract the ZIP file. Then double-click VCSSL.bat (batch file) to execute for Microsoft® Windows®, or execute VCSSL.jar (JAR file) on the command line for Linux® and other OSes.
For details, see How to Use.

Sin Wave Animation

This program draws the sine wave as animation, under the specified wave parameters, e.g.: the amplitude: A, the wavelength: \(\lambda\), and the period: T.

- Table of Contents -

Sponsored Link


How to Use

Download and Extract

At first, click the "Download" button at the above of the title of this page by your PC (not smartphone). A ZIP file will be downloaded.

If you are using Windows, right-click the ZIP file and choose "Properties" from the menu, and enable "Unblock" checkbox at the right-bottom (in the line of "Security") of the properties-window. Otherwise, when you extract the ZIP file or when you execute the software, security warning messages may pop up and the extraction/execution may fail.

Then, please extract the ZIP file. On general environment (Windows®, major Linux distributions, etc.), you can extract the ZIP file by selecting "Extract All" and so on from right-clicking menu.

» If the extraction of the downloaded ZIP file is stopped with security warning messages...

Execute this Program

Next, open the extracted folder and execute this VCSSL program.

For Windows

Double-click the following batch file to execute:

VCSSL__Double_Click_This_to_Execute.bat

For Linux, etc.

Execute "VCSSL.jar" on the command-line terminal as follows:

cd <extracted_folder>
java -jar VCSSL.jar

» If the error message about non-availability of "java" command is output...

After the program has been launched

Just after the program has been launched, the program asks you whether you want to input wave parameters. If you want, select "Yes" and imput them. If you select "No", the default parameters are set automatically.

Then, the graph window (RINEARN Graph 2D) and the setting window will be displayed.

window

On the graph window, the sine wave will be displayed as animation. On the setting window, you can control parameters of the sine wave, e.g.: the amplitude: A, the wavelength: \(\lambda\), and the period: T.

For terminating the program, close either the graph window or the setting window.

Theme

The sine wave

There are various forms of the expressions for the sine wave, depends on fields. The following is one of typical expressions of the sine wave:

\[ y = A \sin 2 \pi \bigg( \frac{t}{T} - \frac{x}{\lambda} \bigg) \]

where A is the amplitude, \(\lambda\) is the wavelength, T is the period. Generarry, we can add the "initial phase" \(\delta\) as a term in sin(...), but we omit it here for simplicity.

Followings are the brief descriptions of the wave parameters A, \(\lambda\), and T.

Amplitude: A

The amplitude (A) is the parameter representing the half width of the oscillation of the sine wave:

The amplitude of the sine wave.

Wavelength: \(\lambda\)

The wavelength \(\lambda\) is the parameter representing the horizontal (for \(x\)-direction) length, of a "spatial period" of the sine wave. The sine function is a periodic function, so if we slide a sine wave for x-direction some distance, if just fits to the original (unshifted) sine wave. That distance is the wavelength.

More simply, we can express the wavelength as the width of a couple of a "mountain" and a "valley" of the sinewave:

The wavelength of the sine wave

Period: \(T\)

The period (T) -- or referred to as "time period" more explicitly -- is the parameter representing the amount of time from any moment \(t_0\), to the first moment after \(t_0\) at which the shape of the sine wave is completely the same as it at \(t_0\).

Simply put, see a point at just peak of a mountain of the sine wave, as the following figure. Let's regard this time moment as \(t_0\). As time advances, this point falls toward the next vallay, and then climbs the next mountain.

The period of the sine wave

When the point reaches to the peak of a (next) mountain again, the time equals to \(t_0 + T\), where \(T\) is the period of the sine wave.

Code

About language

This program is written in VCSSL.

VCSSL is a scripting language having C-like simple syntax. So, if you are accustomed with C-like languages (C, C++, and so on), you can read code of this program easily.

Whole Code

All code of this program is written in the text file "RadianConverter.vcssl". You can open by your favorite text editor, and modify freely. It does not require to be compiled for running.

The following is the whole code of this program:

As the above, the code of this program has about 250 lines.

For details, see comments in the code.

Author

Fumihiro Matsui
President of RINEARN, developing VCSSL & Vnano, RINEARN Graph 3D/2D, and so on.

License

The license of this VCSSL / Vnano code (the file with the extension ".vcssl" / ".vnano") is CC0 (Public Domain), so you can customize / divert / redistribute this VCSSL code freely.

Also, if example code written in C/C++/Java are displayed/distributed on Code section of this page, they also are distributed under CC0, unless otherwise noted.



Sponsored Link



Japanese English
[ Prev | Index | Next ]
Circular Wave Animation

Draws the circular wave as 3D animation, under the specified wave parameters.
Sine Wave Animation

Draws the sine wave as animation, under the specified wave parameters.
Vnano | Solve The Lorenz Equations Numerically

Solve the Lorenz equations, and output data to plot the solution curve (well-known as the "Lorenz Attractor") on a 3D graph.
Index
[ Prev | Index | Next ]
Circular Wave Animation

Draws the circular wave as 3D animation, under the specified wave parameters.
Sine Wave Animation

Draws the sine wave as animation, under the specified wave parameters.
Vnano | Solve The Lorenz Equations Numerically

Solve the Lorenz equations, and output data to plot the solution curve (well-known as the "Lorenz Attractor") on a 3D graph.
News

Released Ver.1.0 of the Scientific Calculator App "RINPn"
2022/12/31 - We have released the first general release version (Ver.1.0) of the programmable scientific calculato app "RINPn". Explains the details.

Released Ver.1.0 of Vnano Scripting Engine/Language
2022/12/12 - Vnano Scripting Engine has transited from the beta stage to the general release stage, and we have released the first general release version: 1.0. Explains the details.

Updated the Scientific Calculator "RINPn": Added a Retractable Key-Panel, etc.
2022/11/11 - We have updated the scientific calculator app &quto;RINPn" to Ver.0.9.4. Explains the details of the changes by this update.

Updated Contents
Circular Wave Animation

Draws the circular wave as 3D animation, under the specified wave parameters.
2022/12/14
Sine Wave Animation

Draws the sine wave as animation, under the specified wave parameters.
2022/11/26
Tool For Converting Units of Angles: Degrees and Radians

A GUI tool for converting the angle in degrees into radians, or radians into degrees.
2022/11/22
Connector Fatal Exception - Specification
The unchecked exception thrown when errors have occurred, caused by incorrect implementations (might be bugs).
2022/09/26
Connector Exception - Specification
The checked exception thrown when errors have occurred, cause by expected normal problems.
2022/09/26
Announcement (Twitter)