Wolfram Computation Meets Knowledge

Food and Sun: Wolfram Language Recipe Graphs for the Solar Eclipse

Food and Sun: Wolfram Language Recipe Graphs for the Solar Eclipse

At Wolfram Research, we are excited for the April 8 total solar eclipse and plan to observe this extraordinary event in several ways. Read about the science and math of this rare phenomenon in Stephen Wolfram’s new book, Predicting the Eclipse: A Multimillennium Tale of Computation, and then find eclipse specifics for your location with the Wolfram precision eclipse website. Now that you know why and where, prepare for your upcoming watch party with these Sun-related recipes using two new functions from the Wolfram Function Repository: RecipeGraph and NutrientComparisonBarChart.

RecipeGraph relies on a large language model (LLM) to help create a graph of the ingredients and instructions for a recipe. The recipe ingredients and instructions form the vertices of the graph. The edges (lines connecting the vertices) represent the flow of the preparation and cooking process. Each ingredient connects to the instruction in which it is used. NutrientComparisonBarChart creates a dual bar chart comparing the calories and macronutrients (protein, carbohydrates, fat and fiber) in a list of foods.

Now you’re ready to celebrate. Prepare your favorite recipes, grab your ISO-compliant eclipse glasses and make special memories with family and friends on this historic occasion.

Sunshine Smoothie and Sunny-Side-Up Eggs

Rise and shine the day of the eclipse with a sunshine smoothie and sunny-side-up eggs:

RecipeGraph [ "Ingredients:

If you’re limiting carbohydrates or maximizing protein, NutrientComparisonBarChart is an efficient way to compare relative carbs and protein per gram of food, so you can make informed nutritional choices for your smoothie. We’re using the "SolarColors" chart style in recognition of the eclipse:

NutrientComparisionBarChart [

Customize your sunny-side-up eggs graph with chart style options:

RecipeGraph ["Ingredients:

Sunflower Seed Granola

The kids can help celebrate the eclipse by mixing the ingredients for baked granola with sunflower seeds. They can stir in chocolate chips after baking for an extra treat. Use NutritionReport to assess this nutritious after-school snack:

NutrientReport ["3 cups rolled oats

This recipe yields 20 servings of 1/3 cup each, for about 200 calories and 4.5 grams of protein per serving:

N [{4020, 89} / 20, 3]

Sunburst Salad and Sun-Dried Tomato Baked Pasta

Make a tasty eclipse-themed dinner of sunburst salad and baked pasta with sun-dried tomatoes.

Use the LLM to create the salad recipe:

RecipeGraph@LLMSynthesize [ "a simple recipe for a sunburst salad"]

Use ImageSynthesize to create an original sun image for the vertices of the baked pasta graph:

ImageSynthesize [

RecipeGraph ["Ingredients:

To Learn More

Visit the Wolfram Function Repository to learn more about these resource functions:

Visit Wolfram Community or the Wolfram Function Repository to embark on your own computational adventures!


Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.