Create a 3d box inside a 2d project

Hello guys,
I’m a processing beginner. I’d like to plot a 3d spectrum inside my 2d application (it will be an equalizer at the end).
This is my setup, I’d like to have the second half of the application plotting a spectrum but I’d like to make it 3d. Any suggestions?
I’ve thought to make the whole canvas 3d and then work with z axis only for the spectrum, but in my mind I need to rotate y-z axis :\

Thank you for your time.

1 Like

Its the other way round

Set your sketch as a 3D sketch (using size() with P3D), draw 3D things then repeat camera(); command and draw 2D stuff on top

1 Like

See number 9 here


Create an offscreen P3D graphics buffer draw the spectrum to that then in draw() use image(…) to copy the buffer to the display. The base application should be P2D not the default JAVA2D