File:Conjugate-unit-hyperbolas.svg

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
Drini-conjugatehyperbolas

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.
Category:CC-BY-SA-4.0#Conjugate-unit-hyperbolas.svg
Category:Self-published work Category:Hyperbolas in Cartesian coordinates Category:Asymptotics Category:Images with R source code Category:SVG mathematics

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()
Category:Asymptotics Category:CC-BY-SA-4.0 Category:Hyperbolas in Cartesian coordinates Category:Images with R source code Category:SVG mathematics Category:Self-published work