File:Conjugate-unit-hyperbolas.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 630 × 630 pixels, file size: 104 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: The rectangular hyperbola x^2 - y^2 and its conjugate, having the same asymptotes.
    Date
    Source Own work
    Author Melikamp
    Other versions

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

    R code

    library(svglite)
    svg("conjugate-unit-hyperbolas.svg")
    
    r = 4 # max |x| and |y|
    res = 100 # plotting resolution per unit
    colg = "gray"
    colx = "springgreen4"
    coly = "royalblue"
    cola = "red"
    
    par(mar = c(3, 3, 1, 1))
    plot.new()
    plot.window(c(-r, r), c(-r, r))
    
    # axes
    axis(1, -r:r)
    axis(2, -r:r)
    mtext("x", side=1, line=2)
    mtext("y", side=2, line=2)
    
    # grid
    abline(h = -r:r, lty=3, col=colg)
    abline(v = -r:r, lty=3, col=colg)
    
    # asymptotes
    abline(0, 1, lty=3, col=cola, lwd=1.5)
    abline(0, -1, lty=3, col=cola, lwd=1.5)
    
    # curves
    x = (((-r-0.2)*res):((r+0.2)*res))/res
    lines(x, sqrt(1+x^2), col=colx, lwd=3)
    lines(x, -sqrt(1+x^2), col=colx, lwd=3)
    lines(sqrt(1+x^2), x, col=coly, lwd=3)
    lines(-sqrt(1+x^2), x, col=coly, lwd=3)
    
    # labels
    text(-0.2, 2.5, expression("x"^2 - "y"^2 == -1), cex=2.3, col=colx)
    text(2.7, -0.5, expression("x"^2 - "y"^2 == 1), cex=2.3, col=coly)
    text(0, -0.8, "asymptotes", col=cola)
    
    dev.off()
    

    Captions

    Conjugate unit hyperbolas

    Items portrayed in this file

    depicts

    image/svg+xml

    718b41f593731141d38f29e805645de4eb9b2ddf

    106,477 byte

    630 pixel

    630 pixel

    21 March 2024

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current22:42, 22 March 2024Thumbnail for version as of 22:42, 22 March 2024630 × 630 (104 KB)wikimediacommons>Melikampbetter green

    There are no pages that use this file.