I am making a 2D simulation of an ensemble of electric dipoles as a free-choice project in numerical science. I plan to calculate forces applied to each end of the dipole. The trouble is that I don't know how to apply forces that are not aligned with the center of mass.

[![2d system](https://i.stack.imgur.com/ehbek.png)](https://i.stack.imgur.com/ehbek.png)

In the diagram above we have a free-floating object with center of mass, $C$, and moment of inertia. Force $F$ is applied at displacement $R$ from the the center of mass. What is the force and torque applied at the center of mass?

I presume the force exerted parallel to $R$ is just $F$ projected on $R$
Torque is possibly $F$ times $R$ times the sine of the angle between $R$ and $F$