File:Cosinus5.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(920 × 172 pixels, file size: 1.24 MB, MIME type: image/gif, looped, 467 frames, 22 s)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: The cosine function is obtained from the cosine function on the interval
Deutsch: Die Kosinusfunktion geht aus der Kosinusfunktion auf dem Intervall hervor
Date
Source Own work
Author Auswahlaxiom
GIF development
InfoField
 
This GIF graphic was created with Asymptote.
Source code
InfoField

Asymptote code

import graph;

unitsize(1.5cm);

real dt = 0.04;
int n = 0;

void ship() {
	write(n);
	shipout(outprefix() + format("-%04d", n));
	++n;
}

pen fix = rgb(0.3, 0, 0.7)+linewidth(2);
pen trans = rgb(0.7, 0, 0.3)+linewidth(2);

string pilabel(real x) {
	int n = floor(2*x/pi+0.5);
	if(n % 2 == 0) {
		return "$"+(n!=2 ? format("%d", n#2) : "")+"\pi$";
	} else {
		return "$\frac{"+(n!=1 ? format("%d", n) : "")+"\pi}2$";
	}
}

xaxis(Label("$x$", EndPoint, 2*E), 0, 5*pi+0.4, LeftTicks(pilabel, n=3, Step=pi/2, NoZero), EndArrow);
yaxis(Label("$y$", EndPoint, 2*N), -1.4, 1.4, LeftTicks(n=2, Step=1), EndArrow);

path cl = box(truepoint(SW), truepoint(NE));
draw(cl, invisible);

draw(graph(cos, 0, pi/2), fix);
clip(cl);

for(real t = 0; t+dt/2 < 1; t += dt) {
	ship();
}

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(rotate(t*90, (pi/2, 0))*graph(cos, 0, pi/2), trans);
	clip(cl);
	ship();
	restore();
}

save();

draw(graph(cos, pi/2, pi), fix);
clip(cl);

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(yscale(cos(t*pi/2))*shift(t*pi/2, 0)*graph(cos, 0, pi), trans);
	clip(cl);
	ship();
	restore();
}

save();

draw(graph(cos, pi, 2*pi), fix);
clip(cl);

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(shift(t*pi, 0)*graph(cos, 0, 2*pi), trans);
	clip(cl);
	ship();
	restore();
}

save();

draw(graph(cos, 2*pi, 4*pi), fix);
clip(cl);

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(shift(t*pi, 0)*graph(cos, 2*pi, 4*pi), trans);
	clip(cl);
	ship();
	restore();
}

save();

draw(graph(cos, 4*pi, 6*pi), fix);
clip(cl);

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(shift(t*pi, 0)*graph(cos, 4*pi, 6*pi), trans);
	clip(cl);
	ship();
	restore();
}

for(real t = 0; t+dt/2 < 1; t += dt) {
	ship();
}

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(shift(-t*pi, 0)*graph(cos, 6*pi, 8*pi), trans);
	clip(cl);
	ship();
	restore();
}

restore();

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(shift(-t*pi, 0)*graph(cos, 4*pi, 6*pi), trans);
	clip(cl);
	ship();
	restore();
}

restore();

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(shift(-t*pi, 0)*graph(cos, 2*pi, 4*pi), trans);
	clip(cl);
	ship();
	restore();
}

restore();

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(yscale(cos(t*pi/2))*shift(-t*pi/2, 0)*graph(cos, pi, 2*pi), trans);
	clip(cl);
	ship();
	restore();
}

restore();

for(real t = 0; t+dt/2 < 2; t += dt) {
	save();
	draw(rotate(-t*90, (pi/2, 0))*graph(cos, pi/2, pi), trans);
	clip(cl);
	ship();
	restore();
}

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:34, 28 March 2017Thumbnail for version as of 15:34, 28 March 2017920 × 172 (1.24 MB)Auswahlaxiom (talk | contribs)User created page with UploadWizard

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file: