Zend certified PHP/Magento developer

Product price based on width plus height in magento 2.4.5-p3

I have a product in which final price is determined by a choice of a set width option plus a choice of set a height option. Is there a way to do this with attributes?