marsha wrote:I am going to join the weight watchers program soon and would like to know if there is a way to calculate the point system for the recipes that I use from the ShopNcook software. Any ideas?
Shop'NCook can compute Weight Watchers points, but the point formula is protected and cannot be distributed with the software. However, you can write yourself a script to compute and display the number of Weight Watchers points for non-commercial use. You can find the Weight Watchers point formula for example at
http://www.alanlight.com/WWPoints.htm . A good starting point to write a Weight Watchers script would be the code below:
#IF FIBER<4
Result: <((ENERGY_CAL/4)-(FAT/0.44))+(FIBER/1)> grams
#ELSE
Result: <((ENERGY_CAL/4)-(FAT/0.44))+(4/1)> grams
#ENDIF
The complete script (Total carbs and proteins script) can be downloaded from
the Script Library.
This code computes the following formula:
(calorie/4)-(fat/0.44)+(min(fiber,4)/1)
where "calorie" is the energy in kcal, "fat" is the total fat in gram and "fiber" is the dietary fibers in gram. The function "min(fiber,4)" represents the minimum between fiber and 4, i.e. yields the dietary fibers when it is less than 4 and yields 4 when it is more or equal to 4.
This formula is just a fancy way of calculating the total weight of the carbohydrates and proteins of the recipe, including only the first 4 grams of fibers. It could be computed more efficiently and precisely with the formula carb+protein-fiber+min(fiber,4) . Note that it is not related to the weight watchers point formula, except that it can be expressed mathematically in a similar format.
Explanation of the script:
The function min is calculated as follow: if the dietary fiber is less than 4, min(fiber,4) is equal to fiber, if it is more, it is equal to 4. The line "#IF FIBER<4" indicates that if fiber is less than 4, the code before #ELSE must be executed, where min(fiber,4) has been replaced by fiber in the formula. Otherwise, the code between #ELSE and #ENDIF is executed, where min(fiber,4) has been replaced by 4 in the formula.
"Result: " and "grams" are displayed as such in the recipes. The formulas between < > are evaluated and the result displayed. "ENERGY_CAL" gives the energy in kcal, "FAT" is the number of gram of fat and "FIBER" is the number of grams of dietary fibers. Note the parenthesis to group the operations: they are important, otherwise the operations are not executed in the correct order.