# How to Draw the Hyperbolic Parametric Curve on the Left side and Confirm the Animation

**URL:** <https://discourse.julialang.org/t/how-to-draw-the-hyperbolic-parametric-curve-on-the-left-side-and-confirm-the-animation/100677>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [June 21, 2023, 10:19pm UTC](https://discourse.julialang.org/t/how-to-draw-the-hyperbolic-parametric-curve-on-the-left-side-and-confirm-the-animation/100677 "2023-06-21T22:19:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freya\_the\_Goddess](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/freya_the_goddess/32/36835_2.png) [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Post date:** [June 21, 2023, 10:19pm UTC](https://discourse.julialang.org/t/how-to-draw-the-hyperbolic-parametric-curve-on-the-left-side-and-confirm-the-animation/100677/1 "2023-06-21T22:19:01Z")

</div>

Hi all,

I am plotting a parametric hyperbolic curve, but I cannot draw the curve on the left side with my codes. I see from this :

> <https://math.stackexchange.com/questions/1495329/parametric-equation-of-a-hyperbola>

I want to know whether the animation is true, for each radians/degree the location of the ball is correct? isn’t cos hyperbolic and sine hyperbolic goes to infinity as t goes to infinity?

```julia
using Plots, LaTeXStrings, Plots.PlotMeasures
gr()

θ1 = 0:0.01:2π
x1 = 1 .*cos.(θ1)
y1 = 1 .*sin.(θ1)

θ2 = -2π:0.01:2π
x2 = 1 .*cosh.(θ2)
y2 = 1 .*sinh.(θ2)

θ3 = 0:0.01:π/6
x3 = 1 .*cosh.(θ3)
y3 = 1 .*sinh.(θ3)

x4 = 1 .*cos.(θ3)
y4 = 1 .*sin.(θ3)

plot(x1, y1, xlims=(-4,4), ylims=(-1.2,2),
	size=(900, 600), label=L"(x,y)=(\cos \ t, \sin \ t)", 
	framestyle=:zerolines, legend=:bottomright,
	bottom_margin=3mm)

plot!(x2, y2, 
	size=(900, 600), label=L"(x,y)=(\cosh \ t, \sinh \ t)", 
	framestyle=:zerolines,
	bottom_margin=3mm)
plot!(x3, y3, 
	size=(900, 600), label=L"(\cosh \ t, \sinh \ t), \ 0 \ ≤ \ t \ ≤ \ \pi/6", 
	linecolor=:green, arrow=true, linewidth=3,
	bottom_margin=3mm)
plot!(x4, y4, 
	size=(900, 600), label=L"(\cos \ t, \sin \ t), \ 0 \ ≤ \ t \ ≤ \ \pi/6", 
	linecolor=:green3, arrow=true, linewidth=3,
	bottom_margin=3mm)

scatter!([1], [0], color = "red1", label="", markersize = 3)
scatter!([cosh(pi/6)], [sinh(pi/6)], color = "red1", label="", markersize = 3)
scatter!([cos(pi/6)], [sin(pi/6)], color = "red1", label="", markersize = 3)

annotate!([(-0.9,0.7, (L"x^{2} + y^{2} = 1", 10, :black))])
annotate!([(1.4,-0.6, (L"x^{2} - y^{2} = 1", 10, :black))])

```

Thanks.

 ![Capture d’écran_2023-06-22_05-13-31](https://global.discourse-cdn.com/julialang/original/3X/a/8/a863d113d4f346f06d750c2290e9ae037eb71b0d.png)

---

<div class="post-metadata">

**Author:** ![j\_verzani](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_verzani/32/8551_2.png) [@j\_verzani](https://discourse.julialang.org/u/j_verzani)\
**Post date:** [June 21, 2023, 11:40pm UTC](https://discourse.julialang.org/t/how-to-draw-the-hyperbolic-parametric-curve-on-the-left-side-and-confirm-the-animation/100677/2 "2023-06-21T23:40:31Z")

</div>

This should help

> <https://github.com/jverzani/CalculusWithJulia.jl/blob/4a1e392aceee1711860d3771981d746cc9a0e48b/src/plot-recipes.jl#L334>

---

<div class="post-metadata">

**Author:** ![Sevi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Sevi](https://discourse.julialang.org/u/Sevi)\
**Post date:** [June 22, 2023, 6:47am UTC](https://discourse.julialang.org/t/how-to-draw-the-hyperbolic-parametric-curve-on-the-left-side-and-confirm-the-animation/100677/3 "2023-06-22T06:47:23Z")

</div>

> [@Freya\_the\_Goddess](#):
>
> I want to know whether the animation is true, for each radians/degree the location of the ball is correct? isn’t cos hyperbolic and sine hyperbolic goes to infinity as ttt goes to infinity?

I think the animation is correct, and your statement also. There are (more than) two ways of parametrizing the curves

- one with the normal (non-hyperbolic) \sec{\theta} and \tan{\theta} for an angle \theta between 0 and 2\pi
- one with the hyperbolic functions \cosh t and \sinh t, but then the curve parameter t is not the same as \theta, instead it has to be in all of \mathbb{R}.

There should be also be some way of expressing t in terms of \theta, basically solving \sec \theta = \cosh t etc.

* * *

This might be useful:

> **[Hyperbola | Parametric equations](https://en.wikipedia.org/wiki/Hyperbola#Parametric_equations)**
>
> A hyperbola with equation 
>   
>     
>       
>         
>           
>             
>               
> x
>                 
> 2
>                 
>               
>               
> a
>                 
> 2
>                 
>               
>             
>           
>         
> −
>         
>           
>             
>               
> y
>                 
> 2
>                 
>               
>               
> b
> ...
