File:Moving-trapezoid.gif

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

Moving-trapezoid.gif(285 × 283 pixels, file size: 162 KB, MIME type: image/gif, looped, 82 frames, 4.1 s)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Explanatory figure to the solution of a geometrical exercise about an isosceles trapezoid.
Date
Source Own work
Author Physis

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 3.0 Unported 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.

Source code[edit]

It has been implemented in Asymptote vector graphics language. The native source enables You to easier modification/reuse.

import geometry;
import animation;

size(10cm);

line e = line( 45, origin),
     f = line(-45, origin);

pen sidestyle = 2+defaultpen,
    diagonalstyle = longdashed,
    squarestyle = dotted,
    altitudestyle = red+longdashed,
    positivestyle = palered,
    negativestyle = paleblue;

draw(e, diagonalstyle);
draw(f, diagonalstyle);

real alt = 10,
     semialt = alt / 2;
draw(box((-alt, -alt), (alt, alt)), invisible);

animation movingtrapezoid = animation("movingtrapezoid");
animation withsquare = animation("withsquare");
animation hints = animation("hints");

void now(real y)
{	real yUp = y + semialt,
	     yDown = y - semialt;
	point A = ( yDown, yDown),
	      B = (-yDown, yDown),
	      C = ( yUp, yUp),
	      D = (-yUp, yUp);
	point A0 = (-semialt, yDown),
	      B0 = ( semialt, yDown),
	      C0 = ( semialt, yUp),
	      D0 = (-semialt, yUp);
	/*
	segment a = segment(A, B),
	        b = segment(B, C),
	        c = segment(C, D),
	        d = segment(D, A);
	*/
	path a = A--B,
	     b = B--C,
	     c = C--D,
	     d = D--A;
	point FootUp = (0, yUp),
	      FootDown = (0, yDown);
	segment salt = segment(FootDown, FootUp);
	point K1 = (-semialt, y),
	      K2 = ( semialt, y);
	path sq = A0--B0--C0--D0--cycle;
	dot("$A$", A, SW);
	dot("$B$", B, SE);
	dot("$C$", C, NE);
	dot("$D$", D, NW);
	draw(Label("$a$", MidPoint, RightSide), a, sidestyle);
	draw(Label("$b$", MidPoint, RightSide), b, sidestyle);
	draw(Label("$c$", MidPoint, RightSide), c, sidestyle);
	draw(Label("$d$", MidPoint, RightSide), d, sidestyle);
	draw(Label("10", MidPoint, RightSide), salt, altitudestyle, Arrows);
	movingtrapezoid.add();
	draw(sq, squarestyle);
	withsquare.add();
	fill(A--A0--K1--cycle, positivestyle);
	fill(B--B0--K2--cycle, positivestyle);
	fill(C--C0--K2--cycle, negativestyle);
	fill(D--D0--K1--cycle, negativestyle);
	hints.add();
}

real epsilon = 0.1;
for (real y = -semialt + 9epsilon; y < semialt - 9epsilon; y+= epsilon)
{	save();
		now(y);
	restore();
}
movingtrapezoid.movie();
hints.movie();
withsquare.movie();

File history

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

Date/TimeThumbnailDimensionsUserComment
current14:52, 24 December 2013Thumbnail for version as of 14:52, 24 December 2013285 × 283 (162 KB)Physis (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: