Skip to content

Instantly share code, notes, and snippets.

@benatkin
Created February 19, 2018 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benatkin/83518c54bd124a7cda2ec2aacc4c6d84 to your computer and use it in GitHub Desktop.
Save benatkin/83518c54bd124a7cda2ec2aacc4c6d84 to your computer and use it in GitHub Desktop.
const App = () => {
const points = symmetricalCurvePoints({
controlX: 10,
endpointX: 35,
endpointDistance: 15,
controlDistance: 35
})
return (
<div>
<svg
viewBox="0 0 100 100"
style={{ border: "1px solid lightgray", width: "80vw" }}
>
<Guide start={points[0]} end={points[1]} />
<Guide start={points[2]} end={points[3]} />
<path
strokeWidth="1"
stroke="blue"
strokeOpacity={0.5}
fill="transparent"
d={curve(...points)}
/>
</svg>
</div>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment