File:Фрактал из прямоугольников.png

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

Original file(885 × 895 pixels, file size: 45 KB, MIME type: image/png)

Captions

Captions

Fractal from rectangles

Summary

[edit]
Description
English: Fractal from rectangles
Русский: Фрактал из прямоугольников
Date
Source Own work
Author Владислав Молдован

Pascal src code

[edit]
uses GraphABC; 
const
  P = 49 / 100;

procedure RRect(x, y, x1, y1: real):=Rectangle(Round(x), Round(y), Round(x1 + 1), Round(y1 + 1)); 

procedure Draw(x, y, x1, y1, n: real);
begin
  var dx := Abs((x1 - x) * P); 
  var dy := Abs((y1 - y) * P);
  
  RRect(x, y, x1, y1);
  
  if dx > 1 then 
  begin
    var xm := x - dx;
    var ym := y - dy;
    var x1p := x1 + dx;
    var y1p := y1 + dy;
    
    if n <> 1 then Draw(xm, ym, x, y, 3); 
    if n <> 2 then Draw(x1, ym, x1p, y, 4); 
    if n <> 3 then Draw(x1, y1, x1p, y1p, 1); 
    if n <> 4 then Draw(xm, y1, x, y1p, 2); 
  end; 
end;

begin
  LockDrawing();
  Draw(300, 300, 600, 600, 0);
  Redraw();
end.

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
current14:14, 1 September 2017Thumbnail for version as of 14:14, 1 September 2017885 × 895 (45 KB)Владислав Молдован (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:

Metadata