# Rotating cube in Makie not working

**URL:** <https://discourse.julialang.org/t/rotating-cube-in-makie-not-working/25116>\
**Category:** Visualization\
**Created:** [June 10, 2019, 1:30pm UTC](https://discourse.julialang.org/t/rotating-cube-in-makie-not-working/25116 "2019-06-10T13:30:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noel\_Araujo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/noel_araujo/32/4862_2.png) [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Post date:** [June 10, 2019, 1:30pm UTC](https://discourse.julialang.org/t/rotating-cube-in-makie-not-working/25116/1 "2019-06-10T13:30:58Z")

</div>

Hello,

I just found this example of a cube that should be rotating [link](https://rosettacode.org/wiki/Draw_a_rotating_cube#Julia):

```julia

using Makie
 
N = 40
interval = 0.10
 
scene = mesh(FRect3D(Vec3f0(-0.5), Vec3f0(1)), color = :skyblue2)
rect = scene[end]
 
for rad in 0.5:1/N:8.5
    arr = normalize([cospi(rad/2), 0, sinpi(rad/2), -sinpi(rad/2)])
    rotate!(rect, Quaternionf0(arr[1], arr[2], arr[3], arr[4]))
    sleep(interval)
end

```

However, when I run the code, I got **UndefVarError : normalize not defined**.  
Does the `normalize` function still exist inside other package ?

And for curiosity, if I want to perform a rotation using similar syntax of Plots package, with `camera = (azimuth, elevation)`, is there any simple conversion from angles into quartenions to use with Makie ?

Thank you ❤

---

<div class="post-metadata">

**Author:** ![cserteGT3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/csertegt3/32/8283_2.png) [@cserteGT3](https://discourse.julialang.org/u/cserteGT3)\
**Post date:** [June 10, 2019, 1:54pm UTC](https://discourse.julialang.org/t/rotating-cube-in-makie-not-working/25116/2 "2019-06-10T13:54:21Z")

</div>

> [@Noel\_Araujo](#):
>
> However, when I run the code, I got **UndefVarError : normalize not defined**.  
> Does the `normalize` function still exist inside other package ?

It’s part of the `LinearAlgebra` package, so you need to use that too.
