Skip to content
  • 0 Votes
    4 Posts
    1k Views
    StevenFSS

    Resolution:
    The final puzzle piece was in the QML. I had to set the max x, y, z axis values appropriately for a polar graph which differed from the original square-image values.

    axisX.min: 0 axisY.min: 0 axisZ.min: 0 axisX.max: 360 // [Degrees] axisY.max: 256 // Max data value axisZ.max: 90 // Max calculated radius

    Final c++ was:

    float xo = x - 64.0f; float zo = z - 64.0f; float radius {0.0f}; float angle {0.0f}; radius = std::hypot(xo, zo); angle = std::atan2(zo, xo) * (180/M_PI); angle +=90; angle = std::fmod(angle, 360); if (angle < 0.0) angle += 360; row[x] = QVector3D(angle, value, radius);