# Morph extruded shape geometry end to another shape

**URL:** <https://discourse.threejs.org/t/morph-extruded-shape-geometry-end-to-another-shape/3520>\
**Category:** Questions\
**Tags:** extrude-geometry\
**Created:** [July 24, 2018, 3:56pm UTC](https://discourse.threejs.org/t/morph-extruded-shape-geometry-end-to-another-shape/3520 "2018-07-24T15:56:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpetrow](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kpetrow/32/6034_2.png) [@kpetrow](https://discourse.threejs.org/u/kpetrow)\
**Post date:** [July 24, 2018, 3:56pm UTC](https://discourse.threejs.org/t/morph-extruded-shape-geometry-end-to-another-shape/3520/1 "2018-07-24T15:56:39Z")

</div>

If i have two different shapes and want to extrude a geometry between them is that possible? If not i plan to find the two closest points on flattened plane then start to walk the vertices of one of the shapes to the closest of the other shape. Any ideas on how to do it using current code/lib?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [July 24, 2018, 6:59pm UTC](https://discourse.threejs.org/t/morph-extruded-shape-geometry-end-to-another-shape/3520/2 "2018-07-24T18:59:00Z")

</div>

> [@kpetrow](#):
>
> If i have two different shapes and want to extrude a geometry between them is that possible?

No, `ExtrudeGeometry` or any other library function can’t do this. TBH, I can’t even imagine how this would look like. Can you provide a picture of the result or the process?

> [@kpetrow](#):
>
> If not i plan to find the two closest points on flattened plane

Maybe [Plane.projectPoint()](https://threejs.org/docs/#api/math/Plane.projectPoint) might help here.

---

<div class="post-metadata">

**Author:** ![kpetrow](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kpetrow/32/6034_2.png) [@kpetrow](https://discourse.threejs.org/u/kpetrow)\
**Post date:** [July 24, 2018, 8:18pm UTC](https://discourse.threejs.org/t/morph-extruded-shape-geometry-end-to-another-shape/3520/3 "2018-07-24T20:18:22Z")

</div>

![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/2X/e/ec29b1119a5603b98905e994e8419d3d7cc50cc6.png).

My top and bottom shape could have any number of vertices though. reasonable amounts(\<10) but an unknown amount. Was thinking of:

1. order both points
2. find random point on bottom or top and then finding closest to corresponding bottom or top when flattened
3. march around the top and bottom creating vertices and triangles

Seems like maybe some type of radial Delaney algorithm might work where my points are cast onto sphere from the center to the two shapes?

---

<div class="post-metadata">

**Author:** ![kpetrow](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/kpetrow/32/6034_2.png) [@kpetrow](https://discourse.threejs.org/u/kpetrow)\
**Post date:** [July 24, 2018, 8:40pm UTC](https://discourse.threejs.org/t/morph-extruded-shape-geometry-end-to-another-shape/3520/4 "2018-07-24T20:40:24Z")

</div>

another possible pic to help:  
 ![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/2X/9/90f8f84f29fc8c6b27f6fd0909d7832b45fabaf2.jpg)

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [July 25, 2018, 9:52am UTC](https://discourse.threejs.org/t/morph-extruded-shape-geometry-end-to-another-shape/3520/5 "2018-07-25T09:52:56Z")

</div>

If you find a solution, it would be great if you share a live demo in this thread 😊
