I have got a circle and a triangle inside. I need this figure to rotate around its axis and each time it rotates on a certain angle, it should be painted, overall to get something kind of 'ornament'(on the screen below). I've been trying with `Graphics2D`, but it went bad. How can I do that?

Code:

```
import org.omg.CORBA.TIMEOUT;
import javax.swing.*;
import java.awt.*;
import java.awt.Graphics2D;
import java.awt.geom.AffineTransform;

public class Main extends JPanel {
    public static void main(String[] args) {
        JFrame frame = new JFrame("Laboratorna 1");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        frame.add(new Main());
        frame.setSize(1200, 800);
        frame.setVisible(true);
    }

    public void paintComponent(Graphics g){

        int num_2 = 8;
        int bigOval_h = 300, bigOval_w = 300;

        g.setColor(Color.BLUE);
        g.drawOval(0+500, 0, bigOval_h, bigOval_w);
        g.drawLine(150+500, 0, 20+500, 225);
        g.drawLine(150+500, 0, 280+500, 225);
        g.drawLine(20+500, 225,280+500, 225);
        g.setColor(Color.RED);

    }
}

```

[![enter image description here](https://i.stack.imgur.com/SJ9on.png)](https://i.stack.imgur.com/SJ9on.png)