# Question about Javis.jl

**URL:** https://discourse.julialang.org/t/question-about-javis-jl/50811
**Category:** General Usage
**Tags:** question, package, animations
**Created:** [November 26, 2020, 12:52pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811 "2020-11-26T12:52:10Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 12:52pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/1 "2020-11-26T12:52:10Z")

</div>

Hello, @sudomaze I’m following tutorial 1: Making Your First Javis Animation. However, I do not understand this error warning.

```julia
myvideo = Video(500,500)
Background(1:70, ground)
red_ball = Object(1:70, (args...) -> object(0,"red"), Point(100,0))

render(
    myvideo;
    pathname="circle.gif"
)

```

```julia
MethodError: no method matching arc(::Cairo.CairoContext, ::Int64, ::Int64, ::Symbol, ::Int64, ::Float64)
Closest candidates are:
  arc(::Cairo.CairoContext, ::Real, ::Real, !Matched::Real, ::Real, ::Real) at C:\Users\adeil\.julia\packages\Cairo\smWIA\src\Cairo.jl:711
  arc(::Graphics.GraphicsContext, ::Real, ::Real, !Matched::Real, ::Real, ::Real) at none:0

Stacktrace:
 [1] circle(::Int64, ::Int64, ::Symbol, ::Symbol) at C:\Users\adeil\.julia\packages\Luxor\Sul91\src\curves.jl:15
 [2] circle(::Int64, ::Int64, ::Symbol) at C:\Users\adeil\.julia\packages\Luxor\Sul91\src\curves.jl:12
 [3] object(::Int64, ::String) at .\In[28]:3
 [4] (::var"#9#10")(::Video, ::Vararg{Any,N} where N) at .\In[29]:3
 [5] draw_object(::Object, ::Video, ::Int64, ::Array{Float64,2}) at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\Javis.jl:342
 [6] macro expansion at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\Javis.jl:289 [inlined]
 [7] macro expansion at C:\Users\adeil\.julia\packages\Luxor\Sul91\src\basics.jl:503 [inlined]
 [8] get_javis_frame(::Video, ::Array{Javis.AbstractObject,1}, ::Int64) at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\Javis.jl:288
 [9] macro expansion at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\Javis.jl:219 [inlined]
 [10] macro expansion at C:\Users\adeil\.julia\packages\ProgressMeter\poEzd\src\ProgressMeter.jl:754 [inlined]
 [11] render(::Video; framerate::Int64, pathname::String, liveview::Bool, tempdirectory::String, ffmpeg_loglevel::String) at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\Javis.jl:218
 [12] top-level scope at In[29]:5
 [13] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091

```

I have already installed Cairo.jl and Luxor.jl, buti didn’t get successful. How should I proceed?

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [November 26, 2020, 12:54pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/2 "2020-11-26T12:54:36Z")

</div>

Use O rather than 0, perhaps. The `0` should have a slash through it; the O doesn’t.

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 1:09pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/3 "2020-11-26T13:09:10Z")

</div>

Okay, I did what you advised. Thank you. the output does not show the image.

 ![2020-11-26 (2)](https://global.discourse-cdn.com/julialang/original/3X/c/c/cc32516470ff8a8a71c43bb64fe63b1d8a999fc4.png)

Is the problem now that I’m at Jupyter? I’ll try the REPL.

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [November 26, 2020, 1:11pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/4 "2020-11-26T13:11:42Z")

</div>

Yes each environment you use has different abilities with regard to displaying results such as images and animations. Perhaps ask at Javis HQ for guidance as regards Jupyter.

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 1:13pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/5 "2020-11-26T13:13:48Z")

</div>

Thank you very much.

Best regards.

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 1:32pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/6 "2020-11-26T13:32:32Z")

</div>

Even in Julia REPL the result was the same.

```julia
julia> render(
           myvideo;
           pathname="circle.gif"
       )
Rendering frames...100%|████████████████████████████████████████████████████████████████████████| Time: 0:00:05
"circle.gif"

```

@Wikunia,

What can I do to get the image on the screen?

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [November 26, 2020, 2:08pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/7 "2020-11-26T14:08:47Z")

</div>

The circle is rendered to the file `circle.gif` You need to check it out with an image viewer or something like that. If you want to have a live view of the animation you can use:

```julia
render(myvideo; pathname="circle.gif", liveview=true)

```

We are currently working on a solution to display it inside Jupyter and Pluto notebooks.

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 3:56pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/8 "2020-11-26T15:56:08Z")

</div>

@Wikunia, should this code snippet show the animation on my screen or should I write it another way?

```julia
julia> act!(red_ball, Action(anim_rotate_around(2π,O), liveview=true))

```

```julia
ERROR: MethodError: no method matching Action(::Javis.Rotation{Float64}; liveview=true)
Closest candidates are:
  Action(::Union{Function, Javis.AbstractTransition}; keep) at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\structs\Action.jl:75 got unsupported keyword argument "liveview"
  Action(::Any, ::Union{Javis.ReversedEasing, Animations.Easing}, ::Function; keep) at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\structs\Action.jl:78 got unsupported keyword argument "liveview"
  Action(::Any, ::Union{Javis.ReversedEasing, Animations.Easing}, ::Javis.Translation; keep) at C:\Users\adeil\.julia\packages\Javis\ArqyR\src\structs\Action.jl:81 got unsupported keyword argument "liveview"
  ...
Stacktrace:
 [1] kwerr(::NamedTuple{(:liveview,),Tuple{Bool}}, ::Type{T} where T, ::Javis.Rotation{Float64}) at .\error.jl:157
 [2] top-level scope at REPL[26]:1

```

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [November 26, 2020, 4:07pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/9 "2020-11-26T16:07:07Z")

</div>

No you can only apply `liveview=true` to the `render` function.  
I’m not sure what you mean it should do in your example.

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 4:12pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/10 "2020-11-26T16:12:30Z")

</div>

Okay, I’m going to go after I write the code, where do I see the animation?

```julia
julia> act!(red_ball, Action(anim_rotate_around(2π, O)))
4-element Array{Javis.AbstractAction,1}:
 Action(Javis.Frames{Symbol}(nothing, :same), Animations.Animation{Float64}(Animations.Keyframe{Float64}[Animations.Keyframe{Float64}(0.0, 0.0), Animations.Keyframe{Float64}(1.0, 6.283185307179586)], Animations.Easing{Animations.FuncEasing}[Animations.Easing{Animations.FuncEasing}(Animations.FuncEasing(Animations.f_linear, ()), 1, false, 0.0, 0.0)]), Javis.var"#52#53"{Point}(Point(0.0, 0.0)), nothing, true, Dict{Symbol,Any}())
 Action(Javis.Frames{Symbol}(nothing, :same), Animations.Animation{Float64}(Animations.Keyframe{Float64}[Animations.Keyframe{Float64}(0.0, 0.0), Animations.Keyframe{Float64}(1.0, 6.283185307179586)], Animations.Easing{Animations.FuncEasing}[Animations.Easing{Animations.FuncEasing}(Animations.FuncEasing(Animations.f_linear, ()), 1, false, 0.0, 0.0)]), Javis.var"#52#53"{Point}(Point(0.0, 0.0)), nothing, true, Dict{Symbol,Any}())
 Action(Javis.Frames{Symbol}(nothing, :same), Animations.Animation{Float64}(Animations.Keyframe{Float64}[Animations.Keyframe{Float64}(0.0, 0.0), Animations.Keyframe{Float64}(1.0, 6.283185307179586)], Animations.Easing{Animations.FuncEasing}[Animations.Easing{Animations.FuncEasing}(Animations.FuncEasing(Animations.f_linear, ()), 1, false, 0.0, 0.0)]), Javis.var"#52#53"{Point}(Point(0.0, 0.0)), nothing, true, Dict{Symbol,Any}())
 Action(Javis.Frames{Symbol}(nothing, :same), Animations.Animation{Float64}(Animations.Keyframe{Float64}[Animations.Keyframe{Float64}(0.0, 0.0), Animations.Keyframe{Float64}(1.0, 6.283185307179586)], Animations.Easing{Animations.FuncEasing}[Animations.Easing{Animations.FuncEasing}(Animations.FuncEasing(Animations.f_linear, ()), 1, false, 0.0, 0.0)]), Javis.var"#52#53"{Point}(Point(0.0, 0.0)), nothing, true, Dict{Symbol,Any}())

```

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [November 26, 2020, 4:17pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/11 "2020-11-26T16:17:19Z")

</div>

Currently you build the animation. It needs to be rendered in order to see the gif.

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 4:24pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/12 "2020-11-26T16:24:18Z")

</div>

Please, how do I do that?

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [November 26, 2020, 4:25pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/13 "2020-11-26T16:25:59Z")

</div>

```julia
myvideo = Video(500, 500)
Background(1:70, ground)
red_ball = Object(1:70, (args...) -> object(O, "red"), Point(100,0))
blue_ball = Object(1:70, (args...) -> object(O, "blue"), Point(200,80))
# you can add all `act!`s here

render(
    myvideo;
    liveview=true
)

```

Sorry I think we confuse each other. The last line should always call `render` either to a file with `pathname` or with `liveview=true` to get a live viewer.

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 4:39pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/14 "2020-11-26T16:39:57Z")

</div>

I refer to this step in the tutorial.

 ![2020-11-26 (5)](https://global.discourse-cdn.com/julialang/original/3X/0/3/035edf7140c7ac27e13c7391351e241e0726172d.png)

How do I make the animation appear on my screen?

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [November 26, 2020, 4:44pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/15 "2020-11-26T16:44:16Z")

</div>

As it says: The `render` function stays the same for the rest of this tutorial. So you still need that.

```julia
myvideo = Video(500, 500)
Background(1:70, ground)
red_ball = Object(1:70, (args...) -> object(O, "red"), Point(100,0))
act!(red_ball, Action(anim_rotate_around(2\pi, 0)))

render(
    myvideo;
    liveview=true
)

```

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 4:50pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/16 "2020-11-26T16:50:20Z")

</div>

I think there’s something wrong with software. I had already done this, but a static image of the red ball appears.

```julia
julia> act!(red_ball, Action(anim_rotate_around(2π,O)))
1-element Array{Javis.AbstractAction,1}:
 Action(Javis.Frames{Symbol}(nothing, :same), Animations.Animation{Float64}(Animations.Keyframe{Float64}[Animations.Keyframe{Float64}(0.0, 0.0), Animations.Keyframe{Float64}(1.0, 6.283185307179586)], Animations.Easing{Animations.FuncEasing}[Animations.Easing{Animations.FuncEasing}(Animations.FuncEasing(Animations.f_linear, ()), 1, false, 0.0, 0.0)]), Javis.var"#52#53"{Point}(Point(0.0, 0.0)), nothing, true, Dict{Symbol,Any}())

julia> render(
           myvideo;
           liveview=true
       )
"Live preview started."
```

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [November 26, 2020, 4:52pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/17 "2020-11-26T16:52:14Z")

</div>

Have you moved the slider?

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 4:59pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/18 "2020-11-26T16:59:32Z")

</div>

I hadn’t done that. Now I’ve seen it. I am a high school physics teacher in Brazil. I’m migrating from python (Vpython) to Julia and I think `Javis.jl` is a great option. I’m migrating from python (Vpython) to Julia and I think `Javis.jl` is a great option. Costumo do simulations like this with my students [Queda\_livre\_simples](https://trinket.io/library/trinkets/d8855aaa47).  
When we return to face-to-face classes I intend to teach Julia to my students.

---

<div class="post-metadata">

### Author: ![Wikunia](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wikunia/32/2180_2.png) [@Wikunia](https://discourse.julialang.org/u/Wikunia)
#### Post date: [November 26, 2020, 5:32pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/19 "2020-11-26T17:32:23Z")

</div>

Glad I was able to help you out. Currently everything is completely 2D in Javis. Hope that isn’t a problem

---

<div class="post-metadata">

### Author: ![adeil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adeil/32/16564_2.png) [@adeil](https://discourse.julialang.org/u/adeil)
#### Post date: [November 26, 2020, 5:39pm UTC](https://discourse.julialang.org/t/question-about-javis-jl/50811/20 "2020-11-26T17:39:46Z")

</div>

Thank you so much for your help. One detail, the program is running on Jupyter. With regard to being in 2D, there’s no problem with that.

[Next page](https://discourse.julialang.org/t/question-about-javis-jl/50811.md?page=2)
