If by “C major,” you are assuming the key of C, with, as you explained in a comment, no alterations and no accidentals, and using the note “D” as a reference point, and if you are assuming a triad to mean only the adjacent diatonic intervals of 3rds (based on your graphic), then yes, what you have built is accurate. It is pretty fundamental to music theory. Of course, this applies to any note in the scale, not just D. In C major, start on C, and you can have C be the root (C major), the third (A minor), or the fifth (F major); go to D, and the same applies; go to E, and the same applies; etc. Your question more particularly seems to assume the constraint that the melody be part of the triad itself or be a note that is in common with a note in the triad. This need not be the case; indeed, it often is not the case. Melodies can be tricky, fluid things when you are considering harmonization. Take the well-known “Auld Lang Syne,” for instance: [![“Auld Lang Syne” harmony][1]][1] In this very basic harmonization, even in the _first measure_, we encounter a melody note that does not “fit” into the triad of F major. In almost _every_ measure, there is a melody note that does not “fit” into the triad that is harmonized with it. On the other hand, if you harmonized _every_ note in its own triad according to the rules in your question, it might arguably sound _worse_: [![“Auld Lang Syne” too much harmony][2]][2] The combination of melody notes that _are_ part of the triad and that _are not_ part of the triad is often what provides _musical interest_. This is to say nothing, of course, of _extending_ the harmony beyond triads—suspensions, extensions, and borrowed, oh my! But, given the constraints you provided in your question, yes, notes can be harmonized with any of the three notes in a diatonic triad of which that note is a part—but when harmonizing a melody, I think it is often advisable to know how _best_ to produce _good music_. To _only_ look for triads that “fit” the melody in the way you describe seems like an inadvisable course to stay on, but it is a good _starting_ point. [1]: https://i.sstatic.net/e3h1B.png [2]: https://i.sstatic.net/QY09p.png