Skip to content

Add Bézier playground at /bezier#164

Merged
ianalloway merged 2 commits into
mainfrom
claude/bezier-playground-729tge
Jul 22, 2026
Merged

Add Bézier playground at /bezier#164
ianalloway merged 2 commits into
mainfrom
claude/bezier-playground-729tge

Conversation

@ianalloway

Copy link
Copy Markdown
Owner

Summary

  • Adds /bezier — an interactive De Casteljau visualizer for Bézier curves of degree 1–7
  • src/features/bezier/decasteljau.ts: De Casteljau level computation for any point count, curve-point evaluation, polyline sampling, defaults
  • src/pages/Bezier.tsx: draggable control points (add by clicking, remove by double-click), animated ping-pong t with manual scrub, color-coded construction levels, degree name readout
  • src/App.tsx: lazy-loaded /bezier route with SEO metadata

How it works

  • De Casteljau's algorithm: each level linearly interpolates adjacent pairs at t; the last remaining point is the curve point — the nested colored polylines are the algorithm, animated
  • t ping-pongs 0→1→0 continuously; grabbing the t slider pauses animation for precise scrubbing
  • Adding a point raises the degree (header names it: linear → quadratic → cubic → … → septic); dragging any point reshapes the green curve instantly
  • Construction toggle hides the scaffolding to show just the control polygon and curve

Test plan

  • Load /bezier — cubic curve with 4 numbered points, construction sweeping automatically
  • Drag a control point — curve and construction follow in real time
  • Scrub t manually — animation pauses, construction sits at the chosen t
  • Click empty space — new point appended, degree name updates; 8-point cap enforced
  • Double-click a point — removed (2-point floor)
  • Construction off — only dashed control polygon + green curve + white moving point
  • t=0 pins the white point to point 0; t=1 to the last point
  • Reset restores the default cubic

Generated by Claude Code

De Casteljau levels computed for 2-8 control points: each level lerps
adjacent pairs at t, and the final singleton is the curve point. The
construction renders as nested colored polylines with the white curve
point riding the green curve; t ping-pongs automatically or scrubs
manually (scrubbing pauses the animation). Drag points, click empty
space to add up to 8 (degree name shown: linear through septic),
double-click to remove down to 2. Construction lines can be toggled to
see just the curve.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WgEKRuVdor8KhaiPkv38aQ
@netlify

netlify Bot commented Jul 19, 2026

Copy link
Copy Markdown

Deploy Preview for ianalloway ready!

Name Link
🔨 Latest commit 5fba5aa
🔍 Latest deploy log https://app.netlify.com/projects/ianalloway/deploys/6a614b2a082af700080901c5
😎 Deploy Preview https://deploy-preview-164--ianalloway.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ian-web-forge Ready Ready Preview, Comment Jul 22, 2026 10:59pm

@ianalloway
ianalloway marked this pull request as ready for review July 19, 2026 04:42
Copilot AI review requested due to automatic review settings July 19, 2026 04:42
@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ianalloway
ianalloway merged commit ea22091 into main Jul 22, 2026
4 of 5 checks passed
@ianalloway
ianalloway deleted the claude/bezier-playground-729tge branch July 22, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants