2D Minimap Rotating with Player direction

Continuing the discussion from Nifty HUD causing fps drop:

Take this code here for a fixed picture rotating with your camera.

private Picture compass;
private Node compassNode;

public void initialize(AppStateManager stateManager, Application application) {

private void attachCompass() {
        compass = new Picture("compass");
        compass.setImage(app.getAssetManager(), "Textures/compass.png", true);
        compassNode = new Node();
        compassNode.setLocalTranslation(app.getGuiViewPort().getCamera().getWidth() - 100, app.getGuiViewPort().getCamera().getHeight() - 100, 0);
public void update(float tpf) {

private void updateCompass() {
        float[] angles = cam.getLocalRotation().toAngles(null);
        compassNode.setLocalRotation(new Quaternion(new float[]{0.0f, 0.0f, angles[1]}));

I am assuming the angles are right, but you might have to fix them, because we dont use a normal camera.
Heres a picture of it. The red arrow is north.

If you want to have a minimap, which displays part of the greater map (see example below),
you want to cut out part of an image. I would do this in the same way, that I would handle a texture atlas.
I would check the player’s coordinates and choose which part of the image I want to have.
To actually cut this out, I would calculate the UV coordinates for this image-part.
Calculating the rotation of the UV coordinates might be fun.
This is probably not the most efficient way (shaders, maybe?)

Please don’t ask how to get this round form. I believe you would need shader magic that goes beyond my knowledge ^^