# Mesh 3D Creation

**URL:** <https://discourse.julialang.org/t/mesh-3d-creation/123414>\
**Category:** Performance\
**Tags:** mesh\
**Created:** [December 3, 2024, 12:51pm UTC](https://discourse.julialang.org/t/mesh-3d-creation/123414 "2024-12-03T12:51:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamran\_Ali](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kamran_ali/32/213912_2.png) [@Kamran\_Ali](https://discourse.julialang.org/u/Kamran_Ali)\
**Post date:** [December 3, 2024, 12:51pm UTC](https://discourse.julialang.org/t/mesh-3d-creation/123414/1 "2024-12-03T12:51:40Z")

</div>

I have created a 3D Quad mesh for my model, created vertices and faces for bottom layer, top layer vertices, now i have to make it 3D, so if i apply the loft command, corner faces are created in the diagonal, issue is the selection of indexes for creating faces, can anyone suggest, how we can customize this index selection. Also, if there is any other way ?

---

<div class="post-metadata">

**Author:** ![DanielVandH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielvandh/32/31134_2.png) [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Post date:** [December 3, 2024, 12:54pm UTC](https://discourse.julialang.org/t/mesh-3d-creation/123414/2 "2024-12-03T12:54:11Z")

</div>

Welcome to the forum. In order to make it possible to help you, you will need to provide more detail such as what packages you are using / code that people can run. Please read [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [December 3, 2024, 1:24pm UTC](https://discourse.julialang.org/t/mesh-3d-creation/123414/3 "2024-12-03T13:24:57Z")

</div>

Hi, with some _inpiration_ of [Comodo.jl](https://github.com/COMODO-research/Comodo.jl), I have recently added some 3D meshes capabilities to GMT.jl  
You can do the `lofts` like this example.

```julia
using GMT

s=75; t=linspace(0,2*pi,ns); r=5; x=r*cos.(t); y=r*sin.(t); z=zeros(size(x));
C1=[x[:] y[:] z[:]];
f(t) = r + 2.0.* sin(6.0*t);
C2 = [(f(t)*cos(t),f(t)*sin(t),3) for t in range(0, 2pi, ns)];
C2 = stack(C2)';
FV = loft(C1, C2);
viz(FV, pen=0)

```

The data is stored in the `FV` faces-vertices structure that is more less what one would do in Matlab. But for more complex meshes, and specially interactivity, I suggest you to look to [Comodo.jl](https://github.com/COMODO-research/Comodo.jl)

 ![loft](https://global.discourse-cdn.com/julialang/original/3X/a/7/a74f2fda07174d422c4bdc4e61df9deec8e867d1.png)

---

<div class="post-metadata">

**Author:** ![devel-chm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/devel-chm/32/3572_2.png) [@devel-chm](https://discourse.julialang.org/u/devel-chm)\
**Post date:** [December 3, 2024, 4:02pm UTC](https://discourse.julialang.org/t/mesh-3d-creation/123414/4 "2024-12-03T16:02:30Z")

</div>

What are `linspace()`, `loft()`, and `viz()` and in what packages are they defined?

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [December 3, 2024, 4:33pm UTC](https://discourse.julialang.org/t/mesh-3d-creation/123414/5 "2024-12-03T16:33:41Z")

</div>

I said it was from GMT.jl, but I edited and added that to the post.
