Jump to content

File:Euclid's Orchard (perspective).svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 307 × 142 pixels, file size: 330 KB)

Summary

Description
English: Perspective view of Euclid's orchard. Red lines denote diagonal rows of trees two off the main diagonal.
Date
Source Own work
Author Glosser.ca
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with Asymptote by dvisvgm.
Source code
InfoField

Asymptote code

int gcd(int a, int b) {
    int t;
    while(b > 0) {
        t = a;
        a = b;
        b = t % b;
    }

    return a < 0 ? -a : a;
}

size(40cm,5cm);

int ndots = 50;
for(int i = 1; i < ndots; ++i) {
    for(int j = 1; j < ndots; ++j) {
        if (gcd(i, j) == 1) {
            real angle = atan(j/i);
            real height = 1/sqrt(i^2 + j^2);
            real pos = angle - pi/4;

            if(i == j + 2 || j == i + 2) {
                draw((pos,0)--(pos,height), red);
            } else {
                draw((pos,0)--(pos,height));
            }

        }
    }
}

Licensing

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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

29 December 2012

File history

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

Date/TimeThumbnailDimensionsUserComment
current14:12, 29 December 2012Thumbnail for version as of 14:12, 29 December 2012307 × 142 (330 KB)RayhemUser created page with UploadWizard

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata