# How do I "wrap" a table object (in Luxor) around a torus (donut)?

**URL:** <https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892>\
**Category:** General Usage\
**Tags:** luxor\
**Created:** [April 23, 2021, 7:18pm UTC](https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892 "2021-04-23T19:18:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndresCasillas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andrescasillas/32/27133_2.png) [@AndresCasillas](https://discourse.julialang.org/u/AndresCasillas)\
**Post date:** [April 23, 2021, 7:18pm UTC](https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892/1 "2021-04-23T19:18:39Z")

</div>

I´m currently working on a Jupyter file and with Julia version 1.5.3 on a Windows computer, using Luxor. I have an array of arrays and a function (dibujar\_matriz) which creates a table based on the entries of each array.

function dibujar\_matriz(M, a, b, c)

```
    k = size(M)[1]
    l = size(M)[2]

background("Black")
    t = Table(k, l, 500/k, 500/l)
        for i ∈ 1:l
            for j ∈ 1:k
                if M[j,i] == 1
                    sethue(a,b,c) #Color de la matriz
                    box(t, j, i, :fill)
                end
            end
        end 

```

end

I have been displaying these using @png which works fine, but I would like to display them in a torus shape instead of as a plane image. The idea is for it to look like this:

 ![Life on a torus](https://global.discourse-cdn.com/julialang/original/3X/d/9/d980f904d8a1a81f3fd285b9fa2e6abc31274d15.png)

Any help will be truly appreciated!

---

<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:** [April 23, 2021, 8:16pm UTC](https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892/2 "2021-04-23T20:16:15Z")

</div>

You need to learn Makie.jl. 😂

[https://lazarusa.github.io/Webpage/codeJuliaMakie.html#collapse3dplots](https://lazarusa.github.io/Webpage/codeJuliaMakie.html#collapse3dplots)

---

<div class="post-metadata">

**Author:** ![AndresCasillas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andrescasillas/32/27133_2.png) [@AndresCasillas](https://discourse.julialang.org/u/AndresCasillas)\
**Post date:** [April 25, 2021, 6:14pm UTC](https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892/3 "2021-04-25T18:14:14Z")

</div>

i have already been able to create the torus, yet I have no clue how to “wrap” each array around it.

---

<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:** [April 25, 2021, 7:57pm UTC](https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892/4 "2021-04-25T19:57:29Z")

</div>

I would imagine that you can wrap a PNG or JPEG image around a surface in Makie. I have seen a few “globe” images drawn in Makie ([https://github.com/JuliaPlots/Makie.jl/issues/137](https://github.com/JuliaPlots/Makie.jl/issues/137)) so I’m sure a torus is possible. But I don’t understand Makie at all, so perhaps open an issue there?

---

<div class="post-metadata">

**Author:** ![AndresCasillas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andrescasillas/32/27133_2.png) [@AndresCasillas](https://discourse.julialang.org/u/AndresCasillas)\
**Post date:** [April 28, 2021, 2:54am UTC](https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892/5 "2021-04-28T02:54:57Z")

</div>

Thanks a lot!!

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [April 28, 2021, 7:35am UTC](https://discourse.julialang.org/t/how-do-i-wrap-a-table-object-in-luxor-around-a-torus-donut/59892/6 "2021-04-28T07:35:41Z")

</div>

> [@cormullion](#):
>
> But I don’t understand Makie at all

Truer words have never been said… It’s a really nice package but boy is the manual inscrutable
