recursive waves diagram