// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./motion.hpp
// Function: motion::circular()
void circular()
	{
		// The fixed mass in the middle

		masses.push_back(Mass(WIDTH / 2, HEIGHT / 2, 1));

		// The moving mass

		Mass moving_mass(300, 0, 1);
		masses.push_back(moving_mass);

		// Set the rotation

		double rotation = 0.01 * 2 * M_PI;

		Matrix<2, 2> rotation_matrix({
			{ cos(rotation), -sin(rotation) },
			{ sin(rotation), cos(rotation) },
		});

		// Render 100 frames

		for (int i = 0; i < 100; i++) {
			string frame_number = to_string(i);

			if (frame_number.length() != 4) {
				frame_number = string(4 - frame_number.length(), '0') + frame_number;
			}

			// Move the moving mass

			moving_mass.position = rotation_matrix * moving_mass.position;

			// Set the moving mass in the image

			masses[1].position = masses[0].position + moving_mass.position;

			render_image("output/" + frame_number + ".png", MULTI_THREADED);

			cout << "Rendered frame " << i << "/" << "100\n";
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x60(%rsp), %r14
pushq $0x1
popq %rbp
movq %r14, %rdi
movl $0x3c0, %esi            # imm = 0x3C0
movl $0x21c, %edx            # imm = 0x21C
movl %ebp, %ecx
callq 0x472c
leaq 0x7645(%rip), %rbx      # 0xb290
movq %rbx, %rdi
movq %r14, %rsi
callq 0x637e
leaq 0x8(%rsp), %r15
xorl %r14d, %r14d
movq %r15, %rdi
movl $0x12c, %esi            # imm = 0x12C
xorl %edx, %edx
movl %ebp, %ecx
callq 0x472c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x476a
movaps 0x33ef(%rip), %xmm0     # 0x7070
leaq 0x80(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x40(%rsp), %r12
movq %r15, (%r12)
pushq $0x2
popq %rdx
movq %rdx, 0x8(%r12)
movaps 0x33db(%rip), %xmm0     # 0x7080
leaq 0x20(%rsp), %r13
movaps %xmm0, (%r13)
movq %r13, 0x10(%r12)
movq %rdx, 0x18(%r12)
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x49b6
leaq 0xa8(%rsp), %rbx
leaq 0x34a3(%rip), %rbp      # 0x7178
cmpl $0x64, %r14d
je 0x3dff
movq %r12, %rdi
movl %r14d, %esi
callq 0x4a2c
movq 0x48(%rsp), %rax
cmpq $0x4, %rax
je 0x3d39
pushq $0x4
popq %rsi
subq %rax, %rsi
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r13, %rdi
pushq $0x30
popq %rdx
callq 0x32c0
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4a85
movq %r12, %rdi
movq %r15, %rsi
callq 0x32d0
movq %r15, %rdi
callq 0x3120
movq %r13, %rdi
callq 0x3120
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
leaq 0x60(%rsp), %rdi
callq 0x4aa4
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movq 0x752e(%rip), %rdi      # 0xb290
callq 0x4b18
movq 0x7522(%rip), %rax      # 0xb290
movsd %xmm0, 0x18(%rax)
movsd %xmm1, 0x20(%rax)
movq %r15, %rdi
leaq 0x33de(%rip), %rsi      # 0x7160
movq %r12, %rdx
callq 0x4b91
movq %rbx, %rdi
movq %r15, %rsi
leaq 0x33f9(%rip), %rdx      # 0x7190
callq 0x4b72
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x3ad2
movq %rbx, %rdi
callq 0x3120
movq %r15, %rdi
callq 0x3120
movq 0x7212(%rip), %rdi      # 0xafd0
leaq 0x33a3(%rip), %rsi      # 0x7168
callq 0x3260
movq %rax, %rdi
movl %r14d, %esi
callq 0x3400
movq %rax, %rdi
leaq 0x3387(%rip), %rsi      # 0x7166
callq 0x3260
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3260
movq %r12, %rdi
callq 0x3120
incl %r14d
jmp 0x3cd5
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
jmp 0x3e40
jmp 0x3e47
jmp 0x3e47
jmp 0x3e47
jmp 0x3e47
movq %rax, %rbx
jmp 0x3e38
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x3120
leaq 0x80(%rsp), %rdi
callq 0x3120
jmp 0x3e4a
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x3420