Why transformations and shapes can't be used within beginShape()

Hello everyone!

I recently started using Processing and I learned from the reference page that transformations such as translate() rotate() as well as other shapes do not work within beginShape().
So why is that happening?

1 Like

Hi @alikaikai – welcome to the forum.

I didn’t understand yoru question here. So why is what happening?

thank you!
I just wonder why those functions can’t be used between beginShape() and endShape()

I think it is prevented, because you would have to create (calculate, draw) the construct from beginShape() ... endShape() before you can translate or rotate it. It would break how translate and rotate is implemented.

If you wish to find points using transformations and then add those relative coordinates to shapes as absolute vertices, one method is to use modelX / modelY:


1 Like