Skip to main content
edited body
Source Link
bubba
  • 45k
  • 3
  • 70
  • 127

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector VA = Q - P; Vector U = new Vector(-A.Y, A.X); // Perpendicular to PQ double s = 2.0/3.0; // Scale factor Vector[] controlPoints = { P, P + s*U, Q + s*U, Q }; 

For general circular arcs, complete details are given in "Good approximation of circles by curvature-continuous Bézier curves", by Tor Dokken, Morten Dæhlen Tom Lyche, Knut Mørken, Computer Aided Geometric Design Volume 7, Issues 1–4, June 1990, Pages 33-41.

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector V = Q - P; Vector U = new Vector(-A.Y, A.X); // Perpendicular to PQ double s = 2.0/3.0; // Scale factor Vector[] controlPoints = { P, P + s*U, Q + s*U, Q }; 

For general circular arcs, complete details are given in "Good approximation of circles by curvature-continuous Bézier curves", by Tor Dokken, Morten Dæhlen Tom Lyche, Knut Mørken, Computer Aided Geometric Design Volume 7, Issues 1–4, June 1990, Pages 33-41.

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector A = Q - P; Vector U = new Vector(-A.Y, A.X); // Perpendicular to PQ double s = 2.0/3.0; // Scale factor Vector[] controlPoints = { P, P + s*U, Q + s*U, Q }; 

For general circular arcs, complete details are given in "Good approximation of circles by curvature-continuous Bézier curves", by Tor Dokken, Morten Dæhlen Tom Lyche, Knut Mørken, Computer Aided Geometric Design Volume 7, Issues 1–4, June 1990, Pages 33-41.

added 263 characters in body
Source Link
bubba
  • 45k
  • 3
  • 70
  • 127

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector V = Q - P; Vector U = new Vector(-A.Y, A.X); // Perpendicular to PQ double s = 2.0/3.0; // Scale factor Vector[] controlPoints = { P, P + s*U, Q + s*U, Q }; 

For general circular arcs, complete details are given in "Good approximation of circles by curvature-continuous Bézier curves", by Tor Dokken, Morten Dæhlen Tom Lyche, Knut Mørken, Computer Aided Geometric Design Volume 7, Issues 1–4, June 1990, Pages 33-41.

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector V = Q - P; Vector U = new Vector(-A.Y, A.X); // Perpendicular to PQ double s = 2.0/3.0; // Scale factor Vector[] controlPoints = { P, P + s*U, Q + s*U, Q }; 

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector V = Q - P; Vector U = new Vector(-A.Y, A.X); // Perpendicular to PQ double s = 2.0/3.0; // Scale factor Vector[] controlPoints = { P, P + s*U, Q + s*U, Q }; 

For general circular arcs, complete details are given in "Good approximation of circles by curvature-continuous Bézier curves", by Tor Dokken, Morten Dæhlen Tom Lyche, Knut Mørken, Computer Aided Geometric Design Volume 7, Issues 1–4, June 1990, Pages 33-41.

edited body
Source Link
bubba
  • 45k
  • 3
  • 70
  • 127

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $d$ be the distance between $\mathbf{P}$ and $\mathbf{P}$, and let $\mathbf{U}$ be a unit vector perpendicular toobtained by rotating $\mathbf{P}\mathbf{Q}$$\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 d \mathbf{U}$$\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 d \mathbf{U}$$\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector AV = Q - P; Vector BU = new Vector(-A.Y, A.X); // Perpendicular to PQ Vectordouble Cs = (2.0/3.0)*B;0; // Scaled to the correct// lengthScale factor Vector[] controlPoints = { P, P + Cs*U, Q + Cs*U, Q }; 

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $d$ be the distance between $\mathbf{P}$ and $\mathbf{P}$, and let $\mathbf{U}$ be a unit vector perpendicular to $\mathbf{P}\mathbf{Q}$. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 d \mathbf{U}$, $\mathbf{Q} + \tfrac23 d \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector A = Q - P; Vector B = new Vector(-A.Y, A.X); // Perpendicular to PQ Vector C = (2.0/3.0)*B; // Scaled to the correct length Vector[] controlPoints = { P, P + C, Q + C, Q }; 

For a unit semi-circle centered at the origin, the points are $(1,0)$, $(1, \tfrac43)$, $(-1, \tfrac43)$, $(-1,0)$. Translate, rotate, and scale as needed.

If the end-points of the diameter are $\mathbf{P}$ and $\mathbf{Q}$, proceed as follows:

Let $\mathbf{U}$ be a vector obtained by rotating $\vec{\mathbf{P}\mathbf{Q}}$ through 90 degrees. Then the control points are $\mathbf{P}$, $\mathbf{P} + \tfrac23 \mathbf{U}$, $\mathbf{Q} + \tfrac23 \mathbf{U}$, $\mathbf{Q}$.

Pseudocode is as follows

Vector V = Q - P; Vector U = new Vector(-A.Y, A.X); // Perpendicular to PQ double s = 2.0/3.0; // Scale factor Vector[] controlPoints = { P, P + s*U, Q + s*U, Q }; 
edited body
Source Link
bubba
  • 45k
  • 3
  • 70
  • 127
Loading
added 50 characters in body
Source Link
bubba
  • 45k
  • 3
  • 70
  • 127
Loading
added 599 characters in body
Source Link
bubba
  • 45k
  • 3
  • 70
  • 127
Loading
Source Link
bubba
  • 45k
  • 3
  • 70
  • 127
Loading