Greetings<br><br> I&#39;m a researcher enrolled in a project that requires fitting measured<br> data into known functions.<br> The measured data is the color variation of a point on a material, as<br> the camera and light source moves around the object.<br>

<br> A simplistic model is the Lambertian BRDF model that simply says that<br> the color value is the dot product of the normal at that point with<br> the incident light direction.<br><br> The incident lighting direction and the camera direction are known,<br>

 they are a discrete set of directions expressed in polar coordinates w<br> := (theta, phi)<br><br> The objective is to find the best parameters of the BRDF model so that<br> it is most correlated with the measured data, this is, to minimize the<br>

 difference between the measured data and the estimated values.<br><br> I came up with this:<br><br> /** This class implements the following NLP.<br>  *<br>  * Lambert BRDF model<br>  * min f(T, N, wi, wo) = T - dot(wi, N)<br>

  *  s.t.<br>  *       f(T, N, wi, wo) &gt;= 0, (non-negativity)<br>  *       f(T, N, wi, wo) = f(T, N, wo, wi) &lt;=&gt; f(T, N, wi, wo) - f(T,<br> N, wo, wi) = 0, (Helmholtz reciprocity)<br>  *       S(f(T, N, wi, wo)cos(theta_o)) &lt;= 1, (conservation of energy)<br>

  *       ||N||2 = 1, (normal is normalized)<br>  *       Nz &gt;= 0, (normal is on the upper hemisphere)<br>  * note:<br>  *  T  -&gt; measured texel value<br>  *  N  -&gt; Normal: {Nx, Ny, Nz}<br>  *  wi -&gt; incomming direction (light):  {theta_i, phi_i}<br>

  *  wo -&gt; outgoing direction (camera): {theta_o, phi_o}<br>  */<br><br> But I do not know how to supply IPOPT with the discrete set of<br> directions of measurement.<br> Can someone assist me on this?<br><br> Regards<br>

Nuno Silva<br clear="all"><br>