A new basis for filament simulation in three dimensions