{"id":39,"date":"2009-04-15T00:38:09","date_gmt":"2009-04-14T23:38:09","guid":{"rendered":"http:\/\/www.spidy.de\/blog\/?page_id=39"},"modified":"2021-07-24T22:09:15","modified_gmt":"2021-07-24T21:09:15","slug":"exposure-calculator","status":"publish","type":"page","link":"http:\/\/www.spidy.de\/blog\/photo-goodies\/exposure-calculator\/","title":{"rendered":"Exposure calculator"},"content":{"rendered":"<p>Calculate an equivalent exposure by changing some of the parameters.<\/p>\n<form name=\"calc\">\n<table cellpadding=\"3\" cellspacing=\"0\" border=\"0\">\n<tbody>\n<tr>\n<th>parameter<\/th>\n<th>value<\/th>\n<th>fixed<\/th>\n<\/tr>\n<tr>\n<td>Aperture:<\/td>\n<td><input type=\"text\" name=\"aperture\" onchange=\"updateShutter();updateISO();update('a');\"\/><\/td>\n<td><input type=\"radio\" name=\"fixed\" value=\"aperture\" onchange=\"disable('aperture');\"\/><\/td>\n<\/tr>\n<tr>\n<td>Shutter:<\/td>\n<td>1\/<input type=\"text\" name=\"shutter\" onchange=\"updateAperture();updateISO();update('t');\"\/> sec<\/td>\n<td><input type=\"radio\" name=\"fixed\" value=\"shutter\" onchange=\"disable('shutter');\"\/><\/td>\n<\/tr>\n<tr>\n<td>ISO:<\/td>\n<td><input type=\"text\" name=\"iso\" disabled=\"true\" onchange=\"updateAperture();updateShutter();update('I');\"\/> sec<\/td>\n<td><input type=\"radio\" name=\"fixed\" value=\"iso\" checked=\"checked\" onchange=\"disable('iso');\"\/><\/td>\n<\/tr>\n<tr>\n<td><input type=\"checkbox\" name=\"active\" value=\"1\" checked=\"checked\"\/><\/td>\n<td>calculate<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/form>\n<p>\n<script language=\"JavaScript\">\r\n        var t = 0.01;\r\n        var a = 8;\r\n        var I = 100;\r\n        var disabled = \"iso\";\r\n        function init() {\r\n            o = document.calc.elements;\r\n            o[\"aperture\"].value = a;\r\n            o[\"shutter\"].value = 1\/t;\r\n            o[\"iso\"].value = I;\r\n        }\r\n        function update(field) {\r\n            o = document.calc.elements;\r\n            switch (field) {\r\n                case \"a\": a = o[\"aperture\"].value; break;\r\n                case \"t\": t = 1\/o[\"shutter\"].value; break;\r\n                case \"I\": I = o[\"iso\"].value; break;\r\n            }\r\n        }\r\n        function radioValue(o) {\r\n            for (var i=0; i<o .length; i++) if (o[i].checked) return o[i].value;\r\n            return false;\r\n        }\r\n        \r\n        function updateAperture() {\r\n            o = document.calc.elements;\r\n            if (radioValue(o[\"fixed\"]) == \"aperture\" || !o[\"active\"].checked) return;\r\n            \/\/alert(\"updateAperture \"+radioValue(o[\"fixed\"])+\" t: \"+t+\" a: \"+a+\" I: \"+I);\r\n            tt =  1\/o[\"shutter\"].value;\r\n            II =  o[\"iso\"].value;\r\n            aperture = a * (1 \/ (Math.sqrt(t\/tt))) * (Math.sqrt(II\/I));\r\n            a = Math.round(1000*aperture)\/1000;\r\n            o[\"aperture\"].value = a;\r\n        }\r\n\r\n        function updateShutter() {\r\n            o = document.calc.elements;\r\n            if (radioValue(o[\"fixed\"]) == \"shutter\" || !o[\"active\"].checked) return;\r\n            aa =  o[\"aperture\"].value;\r\n            II =  o[\"iso\"].value;\r\n            \/\/alert(\"updateShutter \"+radioValue(o[\"fixed\"])+\" t: \"+t+\" a: \"+a+\" aa: \"+aa+\" I: \"+I+\" II: \"+II);\r\n            shutter = t * (I\/II) * (1 \/ ((a\/aa)*(a\/aa)) );\r\n            t = shutter; Math.round(10000*shutter)\/10000;\r\n            o[\"shutter\"].value = Math.round(1\/t);\r\n        }\r\n\r\n        function updateISO() {\r\n            o = document.calc.elements;\r\n            if (radioValue(o[\"fixed\"]) == \"iso\" || !o[\"active\"].checked) return;\r\n           \/\/ alert(\"updateISO \"+radioValue(o[\"fixed\"])+\" t: \"+t+\" a: \"+a+\" I: \"+I);\r\n            aa =  o[\"aperture\"].value;\r\n            tt =  1\/o[\"shutter\"].value;\r\n            iso = I * (t\/tt) * ((aa\/a)*(aa\/a));\r\n            I = Math.round(1000*iso)\/1000;\r\n            o[\"iso\"].value = I;\r\n        }\r\n        function disable(name) {\r\n        \to = document.calc.elements;\r\n        \t\/\/alert(disabled+\" - \"+name);\r\n        \to[disabled].disabled = false;\r\n        \to[name].disabled = true;\r\n        \tdisabled = name;\r\n        }\r\n        init();\r\n    <\/script>\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Calculate an equivalent exposure by changing some of the parameters. parameter value fixed Aperture: Shutter: 1\/ sec ISO: sec calculate<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":134,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/pages\/39"}],"collection":[{"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":20,"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/pages\/39\/revisions"}],"predecessor-version":[{"id":403,"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/pages\/39\/revisions\/403"}],"up":[{"embeddable":true,"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/pages\/134"}],"wp:attachment":[{"href":"http:\/\/www.spidy.de\/blog\/wp-json\/wp\/v2\/media?parent=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}