Kinetic skin for buildings

This is a reference image for a kinetic facade (skin) that I am trying to achieve for my building to reduce the harsh rays of the sun. Each flap rotates out around 45 degrees. Can someone help me on how to achieve this on a grasshopper code. Thankyou!

hi @1820_KEEGAN_JACINTO see attached sample, does this help? (12.4 KB)

Yes it does help, but i need this automate based of the sun. Thankyou for this, i will look further into it!