;; Prompt word: life of an animal ;; Author: spaces zephyr (defun animal life cycle () "Generate SVG charts and descriptions of an animal's life cycle." (lambda (subject) (let* ((life-stage (Get life-stage theme))) (science data (Get Science Data Theme)) (background styles (Design backgrounds Theme)) (Timeline (Create Timeline Theme)) (Stage emoji (Choose stage emoji theme)) (Decoration emoji (Choose decoration emoji theme)) (Subtitle (Generate Subtitle theme Science Data))) (Create Optimized SVG Chart Theme Life Stage Science Data Background Style Timeline Stage emoji Decoration emoji Subtitle )))) (defun Get life stages (theme) "Get the main life stage of the theme." (case theme (cicadas '("Egg" "Waking stage (underground)" "Adult stage")) (whale '("Fetal stage" "Juvenile stage" "Youth stage" "Adult stage" "Old age")) (giraffe '("neonatal period" "juvenile period" "adolescence" "adulthood" "old age")) (t '("early years" "adulthood" "maturity" "senescence" )))) (defun Get Science Data (Topic) "Get a list of sci-fi data for the topic" (case theme (Cicadas '(("Eggs incubate in twigs for 6-10 weeks and can lay 200-600 eggs per clutch." "Wakame live underground for many years, sucking sap from tree roots to survive." "Wakame undergoes 5 molts and can increase in size up to 20 times." "After the last molt they burrow out of the ground and become adults." "The adult stage lasts only 4-6 weeks and is focused on reproduction and chirping.") "Cicadas have an underground incubation period of up to 17 years, with adults surviving only 4-6 weeks and chirping up to 120 decibels, equivalent to the noise of an airplane taking off.")) (Whales '(("Blue whale fetuses gain 90 kilograms a day, weighing 2.5 tons and 7 meters long at birth."))) "Young whales drink 380 liters of milk a day and gain 30 tons in 7 months." "Young blue whales can dive 200 meters deep and hold their breath for up to 40 minutes." "Adult blue whales are 30 meters long, weigh 190 tons, and eat 4 tons of krill a day." "The longest living blue whale can be up to 110 years old and can swim the equatorial distance of the Earth 13 times in its lifetime.") "The blue whale is the largest animal on Earth, with a heart weighing 600 kilograms, a tongue as heavy as an elephant, and a call that can travel 1,600 kilometers."))) (t '(("Description of data from stage 1" "Data description for stage 2" "Data description for stage 3" "Data description for stage 4" "Data description for stage 5") "Interesting data descriptions for generic themes" )))) (defun Design background (theme) "Design a suitable context based on the theme" (case theme (cicadas '(gradient "E6F3FF" "B3E5FC" land)) (Whale '(gradient "E3F2FD" "90CAF9" ocean)) (giraffe '(gradient "FFFF8E1" "FFE0B2" grassland)) (t '(gradient "F5F5F5" "E0E0E0" generic )))) (defun create timeline (theme) "Creates a timeline of the theme's lifecycle." (case theme (cicadas '("0 years" "4 years" "8 years" "12 years" "16 years" "17 years")) (Whale '("0 years" "10 years" "25 years" "50 years" "75 years" "100 years")) (giraffe '("0 months," "6 months," "2 years," "4 years," "15 years," "25 years")) (t '("early" "growth" "maturity" "later" "senescence" )))) (defun select stage emoji (theme) "Select the emoji associated with a life stage." (case theme (cicadas '("🥚" "🐛" "🦟" "🎵")) (Whale '("🤰" "🍼" "🏊" "🐋" "👵")) (giraffe '("👶" "🐕" "🏃" "🦒" "👵")) (t '("🌱" "🌿" "🌳" "🍂" )))) (defun Select decorated emoji (theme) "Selects a decorated emoji related to the theme." (case theme (cicada '("🌳" "🍃" "🌿" "🍂")) (Whale '("🌊" "🐠" "🦈" "🐙")) (giraffe '("🌴" "🌿" "🦓" "🦁")) (t '("🌱" "🌳" "🍃" "🌞" )))) (defun Generate subtitle (Subject Kopp data) "Generate subheadings based on popular science data" (format "Did you know? %s" (second element Kopp data))) (defun create optimized SVG chart (theme life stage science data background style timeline stage emoji decoration emoji subtitle)) "Create optimized lifecycle SVG chart" (let ((svg-template " <defs </linearGradient </defs {background decorations) {Theme}The Life</text {subtitle_first_line} {Subtitle_second_line} </text {Timestamp} {life-stage tag} {datapoints and sci-fi information} Legend:</text Life Stages</text Life course</text {Legend emoji} {Bottom Decoration Emoji} ")) (fill optimized SVG template svg-template theme life stage science data background style timeline stage emoji decoration emoji subtitle))) (defun start () (print "Please enter the life theme you would like to learn about (e.g. Cicada, Whale, Giraffe, etc.):") (let ((user input (read)))) (Optimize Lifecycle Builder user input))) ;; Run rules Run the (start) function at startup. ;; 2. Generate SVG diagrams and descriptions of the lifecycle based on the topics entered by the user. Output should include optimized SVG charts and related text descriptions, highlighting scientific data and interesting facts.