Does anyone know how to create 3d waveforms any basic code

does anyone know how to create 3d waveforms any basic code

Depends what you mean by 3D. If you mean actual 3D, you’ll probably want to look into 3D rendering with OpenGL.

Pseudo 3D could be done in other ways depending your design.

Waveforms are 2D diagrams, so 3D doesn’t really make sense here.

But if you mean adding some gradients to give it a bit fake lighting, you can simply add a ColourGradient before calling fillPath()

Easy method without using OpenGL:

Use the juce::Matrix3D to project a juce::Vector3D. Omit the z in the projected result, and use x y to draw simple 2d lines, which will appear 3d due to the projection.

For example, using juce::Matrix3D::rotation with x = 60° and z = 135° will give you a simple isometric projection matrix → 3D projection - Wikipedia .

2 Likes

Lol – I feel like an idiot for how I did my “3D” after reading this

for wavetables right?

i’d just draw all the 2d waveforms with a bit of x and y-offset to each other in a transparent colour