Added all remaining gists.

This commit is contained in:
Miguel Astor
2023-06-21 21:40:51 -04:00
parent 22ff5bfa25
commit b0ca706a25
26 changed files with 892 additions and 0 deletions

View File

@@ -0,0 +1 @@
Exposure time conversion between two f-stops.

View File

@@ -0,0 +1,15 @@
/* A function to convert the exposure time between two f-stops.
* Usefull for pinhole cameras. See http://www.pinhole.cz/en/pinholecameras/exposure_01.html
*
* Parameters:
* *) f_from: The f-stop to convert from.
* *) f_to: The f-stop to convert to.
* *) exp_time: The exposure time for the aperture f_from.
*
* Return:
* The exposure time for aperture f_to.
*/
float convertExposureTime(int f_from, int f_to, float exp_time){
float aux = (float)f_to / (float)f_from;
return time * (aux * aux);
}