File:Animation Hertzscher Dipol.ogv
Size of this JPG preview of this OGG file: 800 × 450 pixels. Other resolutions: 320 × 180 pixels | 640 × 360 pixels | 1,024 × 576 pixels | 1,600 × 900 pixels.
Original file (Ogg Theora video file, length 40 s, 1,600 × 900 pixels, 956 kbps, file size: 4.56 MB)
This free media file is from Wikimedia Commons. Its description page is included below. |
Summary
DescriptionAnimation Hertzscher Dipol.ogv |
Deutsch: Animation zum Hertzschem Dipol mit E- und H-Feld. |
Date | |
Source | Own work |
Author | Menner |
Other versions |
Source code (GNU Octave)
#!/usr/bin/octave -qf
%
% 2014
%
%
% calcE
%
% t time
% r radius (might be an array)
% E_theta E field
%
function E_theta = calcE(r, t)
% r
global parameters;
omega = parameters.omega;
epsilon = parameters.epsilon;
lambda = parameters.lambda;
c = parameters.c;
roh = 2 * pi() * r / lambda;
E_theta_1 = ( (1 ./ roh) - (1 ./ roh.^3) ) .* cos(roh .- omega*t);
E_theta_2 = (1 ./roh.^2) .* sin(roh .- omega*t) * -1.;
E_koeff = omega^3 / (4 * pi() * epsilon * c^3);
E_theta = -1 * E_koeff * (E_theta_1+E_theta_2);
endfunction
%
% calcH
%
% t time
% r radius (might be an array)
% H_theta H field
%
function H_phi = calcH(r, t)
% r
global parameters;
omega = parameters.omega;
epsilon = parameters.epsilon;
lambda = parameters.lambda;
c = parameters.c;
roh = 2 * pi() * r / lambda;
H_phi_1 = (1 ./ roh) .* cos(roh .- omega*t);
H_phi_2 = (1 ./roh.^2) .* sin(roh .- omega*t) * -1.;
H_koeff = omega^3 / (4 * pi() * epsilon * c^2);
H_phi = -1 * H_koeff * (H_phi_1 + H_phi_2);
endfunction
%
%
% M A I N
%
%
begin_cputime = time();
global parameters;
parameters.framerate = 20;
parameters.duration = 40;
parameters.cycles = 4;
%parameters.framerate = 20;
%parameters.duration = 1;
%parameters.cycles = 1;
parameters.ylim = 1;
parameters.filename = "animation_hertzscher_dipol";
%parameters.Dimensions = "-S800,450";
parameters.Dimensions = "-S1600,900";
parameters.steps = 50;
parameters.linewidth = 2;
%parameters.plot_E = "r;E-Feld;";
%parameters.plot_H = "b;H-Feld;";
parameters.plot_E = "r;E field;";
parameters.plot_H = "b;H field;";
parameters.plot_decay = "k;1/r;";
%parameters.plot_Radius = "Radius normiert zur Wellenlaenge";
%parameters.plot_Amp = "Amplitude normiert bei Radius einer Wellenlaenge";
parameters.plot_Radius = "Radius normalized to wave length";
parameters.plot_Amp = "Amplitude normalized at radius of one wave length";
parameters.f = 0.1; % Hz
parameters.omega = 2 * pi() * parameters.f;
parameters.epsilon = 8.85418781762e-12; %
parameters.c = 3e8; % m/s
parameters.lambda = parameters.c / parameters.f;
parameters.width = parameters.lambda * 3.; % 3 * wave length
parameters
r = 0:parameters.lambda/parameters.steps:parameters.width;
r_Norm = r ./ parameters.lambda;
t_max = parameters.cycles/parameters.f
%t_schritt = parameters.f/parameters.framerate;
t_schritt = t_max/(parameters.duration*parameters.framerate);
Counter = 1;
Frames = t_max / t_schritt
E_Norm = parameters.omega^3 / (4 * pi() * parameters.epsilon * parameters.c^3);
E_Norm = E_Norm / (2 * pi());
H_Norm = parameters.omega^3 / (4 * pi() * parameters.epsilon * parameters.c^2);
H_Norm = H_Norm / (2*pi());
for t = 0:t_schritt:t_max
close();
E = calcE(r, t);
E = E / E_Norm;
H = calcH(r, t);
H = H / H_Norm;
decay = 1 ./ r_Norm;
plot(r_Norm(1,3:end), E(1,3:end), parameters.plot_E, "linewidth", parameters.linewidth);
hold("on");
plot(r_Norm(1,3:end), H(1,3:end), parameters.plot_H, "linewidth", parameters.linewidth);
plot(r_Norm(1,3:end), decay(1,3:end), parameters.plot_decay, "linewidth", parameters.linewidth);
plot(r_Norm(1,3:end), -1*decay(1,3:end), "color", "k", "linewidth", parameters.linewidth);
ylim([-15, 15]);
xlabel(parameters.plot_Radius);
ylabel(parameters.plot_Amp);
set (gca(), "linewidth", parameters.linewidth);
filename = ["./png/", parameters.filename, "-", num2str(Counter, "%04i"), ".png"]
print(filename, "-dpng", parameters.Dimensions)
Counter += 1;
endfor
printf("Total cpu time: %f seconds\n", time()-begin_cputime);
printf("Finished\n");
Convenience script
#!/bin/sh
start=`date`;
framerate=20
#% framerate=2
name="animation_hertzscher_dipol"
rm ./png -rf
mkdir ./png
octave ./dipol_feld_diagramm.m
rm ./yuv -rf
mkdir ./yuv
png2yuv -j ./png/$name-%04d.png -f $framerate -I p -b 1 > ./yuv/out.yuv
rm ./$name.ogv
./ffmpeg2theora-0.29.linux32.bin ./yuv/out.yuv -F $framerate -v 9 -o ./$name.ogv;
end=`date`;
echo Start: $start;
echo End: $end;
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Items portrayed in this file
depicts
12 September 2014
application/ogg
e817f3d126f3dd6b90261e0d12cc7d59318f9bb4
4,784,711 byte
40.05 second
900 pixel
1,600 pixel
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 16:27, 12 September 2014 | 40 s, 1,600 × 900 (4.56 MB) | Menner | minor modifications | |
14:06, 12 September 2014 | 40 s, 1,600 × 900 (4.86 MB) | Menner | User created page with UploadWizard |
File usage
There are no pages that use this file.
Global file usage
The following other wikis use this file:
- Usage on de.wikipedia.org
- Usage on de.wikibooks.org
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Software used |
|
---|