# Please guys help me, I am trying to complete this morphing between obj

**URL:** <https://discourse.processing.org/t/please-guys-help-me-i-am-trying-to-complete-this-morphing-between-obj/30383>\
**Category:** Coding Questions\
**Created:** [May 31, 2021, 12:18pm UTC](https://discourse.processing.org/t/please-guys-help-me-i-am-trying-to-complete-this-morphing-between-obj/30383 "2021-05-31T12:18:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bello](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bello/32/13441_2.png) [@bello](https://discourse.processing.org/u/bello)\
**Post date:** [May 31, 2021, 12:18pm UTC](https://discourse.processing.org/t/please-guys-help-me-i-am-trying-to-complete-this-morphing-between-obj/30383/1 "2021-05-31T12:18:21Z")

</div>

> please format code with \</\> button \* [homework policy](https://discourse.processing.org/faq/#homework) \* [asking questions](https://discourse.processing.org/t/2147)

\< PShape obj;  
PShape objB;  
PShape objC;  
PShape objD;  
int children = obj.getChildCount();

//onj=teapot objB=pianta objC=teschio objD=mano

ArrayList teapot= new ArrayList();  
ArrayList pianta= new ArrayList();  
ArrayList teschio= new ArrayList();  
ArrayList mano= new ArrayList();

void setup() {  
size(800, 800, P3D);  
background(0);

obj = loadShape(“teapot.obj”);  
objB = loadShape(“pianta.obj”);  
objC= loadShape(“teschio”);  
objD= loadShape(“mano”);  
}  
void draw() {

stroke(255);  
strokeWeight(0.5);  
noFill();

//translate(width/2, height/2);

for (int i = 0; i \< children; i++) {  
PShape child = obj.getChild(i);  
int total = child.getVertexCount();

```
for (int j = 0; j < total; j++) {
  PVector v = child.getVertex(j);
  teapot.add(v);
}

```

}

children = obj.getChildCount();

for (int i = 0; i \< children; i++) {  
PShape child = obj.getChild(i);  
int total = child.getVertexCount();

```
for (int j = 0; j < total; j++) {
  PVector v = child.getVertex(j);
  pianta.add(v);
}

```

}

children = objB.getChildCount();

for (int i = 0; i \< children; i++) {  
PShape child = objC.getChild(i);  
int total = child.getVertexCount();

for (int j = 0; j \< total; j++) {  
PVector v = child.getVertex(j);  
teschio.add(v);  
}  
}

children = objC.getChildCount();

for (int i = 0; i \< children; i++) {  
PShape child = objC.getChild(i);  
int total = child.getVertexCount();

for (int j = 0; j \< total; j++) {  
PVector v = child.getVertex(j);  
mano.add(v);  
}  
}

children = objD.getChildCount();  
}

void update() {  
for ( int i=0; i \<get.size(); i++) {  
PVector Tv = teapot.get(i);  
PVector Pv = pianta.get(i);  
PVector Ev = teschio.get(i);  
PVector Mv = mano.get(i);

```
PVector v = PVector.lerp(Tv, Pv, Ev, Mv, 0.59);
current.set(i, v);

```

}  
}

>

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [May 31, 2021, 12:52pm UTC](https://discourse.processing.org/t/please-guys-help-me-i-am-trying-to-complete-this-morphing-between-obj/30383/2 "2021-05-31T12:52:16Z")

</div>

Hello,

Welcome.

Please format your code properly as per:  
[https://discourse.processing.org/faq#format-your-code](https://discourse.processing.org/faq#format-your-code)

Do you have a specific question?

> [@Guidelines—Asking Questions](https://discourse.processing.org/t/guidelines-asking-questions/2147):
>
> Summary (TL;DR) Ask complete questions to get better answers! Be specific. For example: I want to load an image. I tried using createImg() , and I expected the image to be on canvas, but what happened instead was the image showing up below the canvas. Isolate your problem and work in small steps. Share only the code directly related to your problem if it is part of a bigger project, and if something isn’t working, try the smallest code that could do the thing you want. Can we run your code to …

`:)`

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 31, 2021, 3:30pm UTC](https://discourse.processing.org/t/please-guys-help-me-i-am-trying-to-complete-this-morphing-between-obj/30383/3 "2021-05-31T15:30:34Z")

</div>

do you have the obj files somewhere for download?

otherwise we can’t run your sketch
