File:Кривая Минковского.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Кривая_Минковского.png (371 × 297 pixels, file size: 5 KB, MIME type: image/png)
File information
Structured data
Captions
Summary[edit]
DescriptionКривая Минковского.png |
English: Minkowski curve Русский: Кривая Минковского |
Date | |
Source | Own work |
Author | Владислав Молдован |
pascal src code[edit]
uses GraphABC;
procedure RLine(x, y, x1, y1: real) := Line(Round(x), Round(y), Round(x1), Round(y1));
function GetAngle(x, y, x2, y2: real): real;
begin
var angle := Abs(RadToDeg(ArcTan((y2 - y) / (x2 - x))));
if (x2 = x) and (y2 = y) then
Result := 0
else
if x2 > x then
if y2 > y then Result := angle else Result := 360 - angle
else
if y2 > y then Result := 180 - angle else Result := 180 + angle;
end;
function Distance(x, y, x1, y1: real) := Sqrt(Sqr(x1 - x) + Sqr(y1 - y));
procedure Draw(x, y, x1, y1: real);
begin
var r := Distance(x, y, x1, y1);
if r < 10 then
RLine(x, y, x1, y1)
else
begin
var angle := GetAngle(x, y, x1, y1);
var angleP := DegToRad(angle + 90);
var angleM := DegToRad(angle - 90);
r /= 4;
var dx := (x1 - x) / 4;
var dy := (y1 - y) / 4;
var xA := x + dx;
var yA := y + dy;
var xB := xA + dx;
var yB := yA + dy;
var xC := xB + dx;
var yC := yB + dy;
var x2 := xA + r * Cos(angleP);
var y2 := yA + r * Sin(angleP);
var x3 := xB + r * Cos(angleP);
var y3 := yB + r * Sin(angleP);
var x4 := xB + r * Cos(angleM);
var y4 := yB + r * Sin(angleM);
var x5 := xC + r * Cos(angleM);
var y5 := yC + r * Sin(angleM);
Draw(x, y, xA, yA);
Draw(xA, yA, x2, y2);
Draw(x2, y2, x3, y3);
Draw(x3, y3, xB, yB);
Draw(xB, yB, x4, y4);
Draw(x4, y4, x5, y5);
Draw(x5, y5, xC, yC);
Draw(xC, yC, x1, y1);
end;
end;
begin
Draw(100, 200, 400, 200);
end.
Licensing[edit]
I, the copyright holder of this work, hereby publish it under the following license:
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/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 06:51, 17 September 2017 | 371 × 297 (5 KB) | Владислав Молдован (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on ru.wikibooks.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Horizontal resolution | 37.79 dpc |
---|---|
Vertical resolution | 37.79 dpc |