Build Medical Software Clinical Visuals with AI Lesson 2 of 6 beginner 3 min read

Build an SVG You Can Correct

Build an editable SVG and make three isolated corrections while preserving the relationship it teaches.

In This Lesson

Read with a defined objective.

View the complete course

Learning objectives

  • Locate a label and shape in SVG source.
  • Make three isolated edits and verify the saved file.
  • Match the section to the geometric reference.

Prerequisites

  • Complete lesson 1 and retain its reviewed deliverables.

Build Medical Software Clinical Visuals with AI

Listen to this post

Build an SVG You Can Correct

0:00 / 0:00
On this page 3 sections
Course lessons 6 lessons

The first preview contains a label that overlaps the diagram. A useful next instruction identifies that label and moves it without changing the underlying relationship.

SVG stores vector shapes and text in a structured file. That gives the learner concrete elements to inspect: a path, a label, a stroke, a group. The learner does not need to memorize the format, but should recognize where these elements appear and how edits affect the preview.

Introduce the canvas and viewBox, basic shapes, text, grouping, and readable element names. Use simple geometry first. Do not ask the agent to invent anatomical relationships.

Read the file before asking for another version

I want the first diagram to be small enough to inspect. SVG describes two-dimensional vector graphics in XML; the MDN SVG reference is the technical starting point. The preview shows the picture, while the source exposes the elements that make it.

Ask the agent for two clearly separated groups: object-view and section-view. Give the plane, section outline, and each label stable IDs. The viewBox defines the internal drawing coordinates. Those drawing coordinates do not replace the model coordinates in your brief.

Use the box and z = 1 plane from lesson 1. Label the section as 4 by 2 model units. Draw its outline in a separate view facing the section directly. Keep the object orientation fixed while making corrections.

Make a correction you can trace

Save a first version before editing. In the source, locate the text for the plane label and the element that draws its boundary. Ask for one change at a time, then compare the saved files.

  1. Move the plane label away from the object without moving the plane.
  2. Make the plane boundary dashed without changing the section boundary.
  3. Increase the gap between the object view and the section view without altering dimensions.

Reserve 10 minutes for reading the source, 20 for the first diagram, and 20 for these corrections. If a label moves because an entire group was translated, inspect whether the object moved with it. A visually plausible result can still change the lesson.

Keep this exercise self-contained: shapes, editable text, and no external image or script dependencies. Reopen the saved SVG in a browser. If it fails to open, ask the agent to resolve the markup error before changing the design.

Practice and human checkpoint

Practice: Generate the first diagram from the approved brief. Inspect its source alongside the preview. Request three isolated edits: relocate one label, change one line style, and improve spacing. Reopen the saved file to confirm the edits persisted.

Agent prompt:

Create a self-contained SVG from the attached brief. Use simple geometry, meaningful element IDs, and editable text. Show a labeled plane intersecting the supplied object and a corresponding schematic section. Clearly label separate views. Do not infer missing anatomical details. Include “schematic, not to scale” where applicable. Return the SVG and a list of assumptions for review.

Checkpoint: The learner can identify the source element for one label and one shape. The diagram opens successfully and the three requested edits are visible. Its depicted intersection agrees with the supplied reference.

Deliverable: diagram.svg and assumptions.md.

A correction must survive in the saved source.

Share this article

Share X / Twitter Bluesky LinkedIn

Related articles

Physician Developer

Define What the Learner Must See

Write a visual brief that connects one observable teaching objective to a checkable geometric reference.

· 4 min read
clinical educationsvgvisual development
Physician Developer

Make the Diagram Readable

Review a teaching diagram at its delivery size, add text alternatives, and record an uncoached interpretation.

· 3 min read
clinical educationsvgvisual development
Physician Developer

Add Motion with HyperFrames

Storyboard and export a short HyperFrames animation while preserving the approved diagram and its meaning.

· 3 min read
clinical educationsvgvisual development
Chukwuma Onyeije, MD, FACOG

Chukwuma Onyeije, MD, FACOG

Maternal-Fetal Medicine Specialist

MFM specialist at Atlanta Perinatal Associates. Founder of CodeCraftMD and OpenMFM.org. I write about building physician-owned AI tools, clinical software, and the case for doctors who code.