AI agent that generates Bargue-style atelier drawing tutorials from reference photos.
Working pipeline: segmentation → envelope extraction → charcoal stroke rendering
cd /Users/fletchgraham/dev/charles
source venv/bin/activate
cd src
python main.py ../input/main-image.jpg -p 20rembgisolates subject from background- Binary search finds correct Douglas-Peucker epsilon for target point count
- Basic charcoal renderer with bristle simulation, paper texture, plumb lines
- Strokes too thin/timid - need bolder marks
- No stroke weight variation (corners vs straight runs)
- Construction marks barely visible
- Shadow shape mapping - separate light/dark, draw shadow shapes
- Shadow lay-in - fill shadows with even tone (hatching)
- Depth analysis - use Depth Anything V2 to separate masses into sub-envelopes
- VLM reasoning - Claude vision for artistic decisions + written explanations
src/
main.py # CLI entry point
segmentation.py # rembg wrapper
envelope.py # contour extraction + Douglas-Peucker simplification
renderer.py # CharcoalRenderer class with stroke primitives
input/ # reference images
output/ # generated drawings
VISION.md- full product vision, Bargue method explanationTECHNICAL_PLAN.md- comprehensive tech research (SAM3, Depth Anything, p5.brush, Tripo API, etc.)
- Segmentation: rembg (simple, works) - can upgrade to SAM later
- Envelope: OpenCV contours + Douglas-Peucker
- Rendering: PIL-based charcoal simulation (will likely move to p5.brush for web)
- Future 3D: Headless Blender + Tripo API
# Basic usage
python main.py image.jpg
# Control envelope detail
python main.py image.jpg -p 12 # simpler (fewer points)
python main.py image.jpg -p 30 # more detailed
# Options
--no-plumb # skip plumb line
--no-construction # skip vertex marks
-o path.png # custom output path