We have released a large number of products based on Claude appliedCard Diagram Cue WordsThe output format is always SVG and stable. Some people may wonder why the prompt does not constrain the output format, but the output format is always SVG and stable.
Firstly, the card diagram cues use the LISP language as "pseudo-code", the reason for using the LISP language is that it can better describe the structural complexity of the cause and effect relationships and patterns.
We are based on Card Diagram Cue Words: Generate cue words for various types of science presentation illustrations/PPT visualization cards As an example, this is explained in detail:
- Language Differences Description:
- The input prompts are written in LISP, which is a functional programming language
- The output is SVG (Scalable Vector Graphics), an XML-based vector graphics markup language.
- They are two completely different languages serving different purposes.
- LISP code roles:
- The LISP code is actually a "generator" or "template engine" here.
- It defines a series of functions to process the data and ultimately generate the SVG code.
- The main functions include:
(defun Create optimized SVG charts ...) Core Generation Functions (defun Design Background ...) ; Background Style Generation (defun Generate Subtitle ...) ; Text Content Generation ; Text Content Generation
- Conversion process:
LISP code ---(processing)---> SVG output
┌───────── ──┐ ┌────────────┐
│ LISP function definition │ → │ │ SVG markup language │
│ (Data Processing Logic) │ → │ │ (Graphic Description) │
└────────── ─┘ └────────────┘
- Specific examples:
;; LISP code (input)
(defun Creating optimized SVG charts (theme life stage ...)
(let ((svg-template
""))
...)
...
</svg
- Relationship Explanation:
- The LISP code is the "chef's recipe": it defines the steps of how to process the data and generate the graphs.
- SVG is the "final dish": the final form of visualization
- The LISP code contains all the logic and rules needed to generate the SVG.
- SVG is a product of LISP code execution
- Workflow:
- LISP code receives input parameters (e.g., subject, data, etc.)
- Handling these parameters (e.g., calculating position, selecting colors, etc.)
- Inserting processed data into SVG templates
- Output complete SVG code
- Advantage:
- This separation allows:
- LISP handles complex logic and data conversion
- SVG focuses on visual presentation
- Easier to maintain and modify
- Different visualizations can be generated based on different inputs
- Examples of real-world applications:
;; Function Definitions in LISP
(defun design context (topic)
(case theme
(cicada '(gradient "E6F3FF" "B3E5FC" land))
...))
Convert to:
</linearGradient
</defs
It's like a translation process: the LISP code defines the "rules" and "logic", and these rules are eventually translated into a concrete graphical description of the SVG. This approach allows us to generate and control visualizations programmatically, rather than writing SVG code manually.