Simplified 2D drawing in 3D space?

Hello i’ve been working with things like processingandopenframeworks for audiovisuals.
ihave come to the conclusion that i should just switch to unreal engine for this as it better in manny ways like raytracing.

now i have been wondering how to reproduce code like the openframeworks example below in unreal engine. And in the 3D space.

so basically give a center point for creation of a rectangle. give it a size. give it an oriëntation.
and have the engine draw it for you and check each frame how to redraw.

void ofApp::draw(){
    ofTranslate( ofGetWidth() / 2 , ofGetHeight() / 2 );
    for (int i = 0; i < 30; i++) {
        ofDrawRectangle(0, 0, 500, 500);