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

please format code with </> button * homework policy * asking questions

< 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);

}
}

Hello,

Welcome.

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

Do you have a specific question?

:)

do you have the obj files somewhere for download?

otherwise we can’t run your sketch