Contrary to the comments I think this is possible. If you got all of the open chord shapes such as..
- 0 2 2 1 0 0 (open E)
- 0 0 2 2 2 0 (open A)
- 0 3 2 0 1 0 (open C)
- X 0 0 2 3 2 (open D)
Then you can shift them up using bar chords and you should be able to write code to calculate all the permutations for a particular chord. For example if you wanted all the C major triads (as in your question) you know one is
But you also know one of them is the open A shape above but shifted UP 3 frets...
- 3 3 5 5 5 3 (open A shifted up as a bar chord)
This is your third chord in your question. You can also calculate where to shift the open E shape, which would be...
Again, this is one of the chords in your question. This way you can calculate all the positions for any chord using code - providing you have a sufficient set of open chords that can be comfortably shifted up like this.
So your set of C chords using these initial open shapes would be...
C Chords...
8 10 10 7 8 8
3 3 5 5 5 3
0 3 2 0 1 0
X 10 10 12 14 12
Now if you wanted to know the set of D chords you can actually calculate these by adding 2 to all the numbers above (two of them wrap around an octave but you can work this into a calculation)
D Chords...
10 12 12 11 10 10
5 5 7 7 7 5
10 13 12 10 11 10
X 0 0 2 3 2