This paper shows a method for the optimization of the design of a building integrated photovoltaic system minimizing costs over life-time, through the use of Radiance software, taking into account the constraints imposed by the architecture of the building and of the surroundings. It calculates the annual solar radiation in many spots of a surface (flat or complex) from a geometry defined by the user, calculates the power production from different PV module configurations, and finally the cash flow over the system lifetime. The procedure was applied on a case study, specifically a geodesic dome with embedded triangular photovoltaics, two cities were considered(Izmir-Turkey and Bolzano-Italy) and two shading scenarios (i.e. shading-free and an hypothetical urban background). The solar irradiation values (i.e. yearly insolation) on each triangular face were computed for all scenarios, ranging from ~300 to ~2100 kWh/m2 y for Izmir and from ~250 to ~1600 kWh/m2 y for Bolzano. Cash flow over the BiPV system life-time is plotted for each configuration to evaluate the optimal insolation threshold, leading to the optimal configuration. This work will be part of a complete model, which takes into account other parameters to achieve a multitarget optimization.