もちろん、これがコメント付きの更新されたコードだ：

```python
import tkinter as tk
import math

class RotatingSquare(tk.Canvas):
    def __init__(self, parent, *args, **kwargs):
        super().__init__(parent, *args, **kwargs)
        self.parent = parent
        self.center_x = 150
        self.center_y = 150
        self.square_size = 150
        self.angle = 0
        self.draw_square()

    def draw_square(self):
        # Clear the canvas to remove previous square
        self.delete("all")

        # Calculate the coordinates of the square's vertices
        x1 = self.center_x - self.square_size / 2
        y1 = self.center_y - self.square_size / 2
        x2 = self.center_x + self.square_size / 2
        y2 = self.center_y + self.square_size / 2
        points = [x1, y1, x2, y1, x2, y2, x1, y2]

        # Rotate the points and create a polygon using the rotated points
        rotated_points = self.rotate_points(points)
        self.create_polygon(rotated_points, fill="black")

    def rotate_points(self, points):
        # Rotate the given points around the center of the square
        rotated_points = []
        for i in range(0, len(points), 2):
            x = points[i]
            y = points[i+1]
            rotated_x = self.center_x + (x - self.center_x) * math.cos(self.angle) - (y - self.center_y) * math.sin(self.angle)
            rotated_y = self.center_y + (x - self.center_x) * math.sin(self.angle) + (y - self.center_y) * math.cos(self.angle)
            rotated_points.append(rotated_x)
            rotated_points.append(rotated_y)
        return rotated_points

    def rotate(self):
        # Increment the angle of rotation and redraw the square
        self.angle += 0.05
        self.draw_square()

        # Schedule the next rotation after a small delay
        self.after(10, self.rotate)

if __name__ == '__main__':
    # Create a Tkinter window and a RotatingSquare object
    root = tk.Tk()
    root.title("Rotating Square")
    square = RotatingSquare(root, width=300, height=300)
    square.pack()

    # Start the rotation animation
    square.rotate()

    # Enter the Tkinter event loop
    root.mainloop()
```

お役に立てれば幸いです！また質問があれば教えてください。
Sure, here's the updated code with comments:

```python
import tkinter as tk
import math

class RotatingSquare(tk.Canvas):
    def __init__(self, parent, *args, **kwargs):
        super().__init__(parent, *args, **kwargs)
        self.parent = parent
        self.center_x = 150
        self.center_y = 150
        self.square_size = 150
        self.angle = 0
        self.draw_square()

    def draw_square(self):
        # Clear the canvas to remove previous square
        self.delete("all")

        # Calculate the coordinates of the square's vertices
        x1 = self.center_x - self.square_size / 2
        y1 = self.center_y - self.square_size / 2
        x2 = self.center_x + self.square_size / 2
        y2 = self.center_y + self.square_size / 2
        points = [x1, y1, x2, y1, x2, y2, x1, y2]

        # Rotate the points and create a polygon using the rotated points
        rotated_points = self.rotate_points(points)
        self.create_polygon(rotated_points, fill="black")

    def rotate_points(self, points):
        # Rotate the given points around the center of the square
        rotated_points = []
        for i in range(0, len(points), 2):
            x = points[i]
            y = points[i+1]
            rotated_x = self.center_x + (x - self.center_x) * math.cos(self.angle) - (y - self.center_y) * math.sin(self.angle)
            rotated_y = self.center_y + (x - self.center_x) * math.sin(self.angle) + (y - self.center_y) * math.cos(self.angle)
            rotated_points.append(rotated_x)
            rotated_points.append(rotated_y)
        return rotated_points

    def rotate(self):
        # Increment the angle of rotation and redraw the square
        self.angle += 0.05
        self.draw_square()

        # Schedule the next rotation after a small delay
        self.after(10, self.rotate)

if __name__ == '__main__':
    # Create a Tkinter window and a RotatingSquare object
    root = tk.Tk()
    root.title("Rotating Square")
    square = RotatingSquare(root, width=300, height=300)
    square.pack()

    # Start the rotation animation
    square.rotate()

    # Enter the Tkinter event loop
    root.mainloop()
```

I hope this helps! Let me know if you have any further questions.