File:Non-Desargues configuration.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 540 × 531 pixels, file size: 6 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: A 103 configuration that is not incidence-isomorphic to a Desargues configuration. Redrawn more accurately from a bitmap image by Michael Hardy, Pentagrams.png.
    Date
    Source Own work based on: Pentagrams.png:  by Michael Hardy
    Author David Eppstein
    SVG development
    InfoField
     The SVG code is valid.
     This trigonometry was created with Python.
     and with Adobe.

    Source code

    This image was created as a pdf file by the following Python code, then recolored in Adobe Illustrator and converted to SVG.

    from pyx import canvas,path,color
    from math import *
    
    rot = [e**(pi*0.4j*i) for i in range(5)]
    
    def orient(p,q):
        return p.real * q.imag - p.imag * q.real
    
    def testx(x):
        p = rot[1].real + 1j * x
        return orient(p - 1, p * rot[3] - 1)
    
    lo,hi = 3,4
    while hi - lo > 1e-8:
        mid = (lo+hi)/2.0
        if testx(mid) < 0: hi = mid
        else: lo = mid
    
    c = canvas.canvas()
    
    scale=2.0
    def edge(p,q):
        c.stroke(path.line(p.real*scale,p.imag*scale,q.real*scale,q.imag*scale),
                 [color.rgb.black])
    
    def point(p):
        c.fill(path.circle(p.real*scale,p.imag*scale,0.08*scale),[color.rgb.red])
    
    for i in range(5):
        p2 = 1 * rot[i-4]
        p3 = (rot[1].real + 1j * mid) * rot[i]
        p4 = p3 * rot[2]
        edge(p3,p4)
        edge(p4,p2)
    
    for i in range(5):
        point(1*rot[i])
        point((rot[1].real + 1j * mid) * rot[i])
    
    c.writePDFfile("Non-Desargues configuration")
    

    Licensing

    Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
    In some countries this may not be legally possible; if so:
    I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    8 April 2008

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current06:33, 9 April 2008Thumbnail for version as of 06:33, 9 April 2008540 × 531 (6 KB)wikimediacommons>David EppsteinRecolor more boldly

    There are no pages that use this file.