3d-curve-fitting-figures

Generates publication-grade 3D log-spiral curve fitting figures from point cloud data.

6|1|Updated May 11, 2026
One-click install
npx skills add https://github.com/yakeworld/Synthos --skill 3d-curve-fitting-figures-yakeworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: 3d-curve-fitting-figures
Source: https://github.com/yakeworld/Synthos/tree/main/skills/extended/external-automation/creative/diagrams/figure-generation/3d-curve-fitting-figures
Command: npx skills add https://github.com/yakeworld/Synthos --skill 3d-curve-fitting-figures-yakeworld

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy.

What problem does it solve? Fitting 3D curves (such as log-spirals) to anatomical point clouds and rebuilding them into figures is error-prone: missing center offsets anchor curves to the wrong origin, argsort-based ordering scrambles spiral paths, and inconsistent scripts produce conflicting RMSE values. This Skill codifies the correct fitting pipeline and its known pitfalls so figures are accurate and publication-ready. ## Core Features & Use Cases - Correct 3D Reconstruction: Enforces rebuild formulas that explicitly include the spiral center offset (cx, cy) instead of anchoring curves to the data centroid. - Path-Based Fitting: Requires nearest-neighbor path ordering with np.unwrap for angle expansion, forbidding np.argsort(theta) in final parameter fitting. - Cross-Validation & Consistency: Verifies RMSE, spiral rate b, and visual quality together, and checks that multiple figure scripts output identical parameters. - Use Case: When fitting a log-spiral to cochlear canal centerlines from micro-CT or MRI segmentations, use this Skill to merge two-ended segment annotations, fit the 8-parameter model, and generate multi-specimen composite figures with verified RMSE labels. ## Quick Start Fit a 3D log-spiral to my AC bony point cloud from the micro-CT specimen and generate a publication-grade figure with RMSE and parameter annotations.

Frequently Asked Questions about 3d-curve-fitting-figures

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fit a 3D log-spiral to point cloud data in Python?

Fit a 3D log-spiral by ordering points along a nearest-neighbor path, unwrapping angles with np.unwrap, then regressing log(r) = a + b*theta. Use grid search only to locate the spiral center (cx, cy), and rebuild with centroid + (cx + r*cos)*u + (cy + r*sin)*v + z*normal.

Why does my spiral fit look correct but have wrong RMSE and parameters?

This happens when np.argsort(theta) is used to order points for the final fit, mixing points at similar angles but different spiral positions. RMSE can inflate 10-17x and the spiral rate b can flip sign; use nearest-neighbor path ordering instead.

Why is my reconstructed 3D curve offset from the data points?

The rebuild formula is missing the spiral center offset. Projected 2D coordinates are centered on the data centroid, but the spiral center (cx, cy) differs from it, so reconstruction must use (cx + r*cos)*u + (cy + r*sin)*v rather than r*cos*u alone.

How do I merge two segment annotations labeled from opposite ends?

Merge with np.vstack([seg1, seg2[-2::-1]]), reversing the second segment and dropping the duplicated midpoint. Verify the merge gap is below 0.2mm and the total point count equals len(seg1) + len(seg2) - 1.

How many independent parameters does a 3D log-spiral fit have?

The fit has 8 independent parameters: cx, cy, theta0, a, b, A, omega, and phi. The plane normal is fixed by SVD and the 3D center is fixed at the data centroid, so those transformation parameters are not counted.