[DEV] implement catmul-clak algorithm