An author has based their new thriller on an idyllic Dorset beach.