Generate terrain using cos