@@ -31,28 +31,17 @@ description: >
31
31
32
32
<a href="/reference/p5/endShape">endShape()</a> in order to draw a curve:</p>
33
33
34
- <code>
35
-
36
- beginShape();
37
-
38
-
39
- <p>// Add the first control point.
40
-
41
- curveVertex(84, 91);</p>
42
-
43
- <p>// Add the anchor points to draw between.
44
-
45
- curveVertex(68, 19);
46
-
47
- curveVertex(21, 17);</p>
48
-
49
- <p>// Add the second control point.
50
-
51
- curveVertex(32, 91);</p>
52
-
53
- <p>endShape();
54
-
55
- </p></code>
34
+ <p>
35
+ <code>beginShape();</code><br>
36
+ <code>// Add the first control point.</code><br>
37
+ <code>curveVertex(84, 91);</code><br>
38
+ <code>// Add the anchor points to draw between.</code><br>
39
+ <code>curveVertex(68, 19);</code><br>
40
+ <code>curveVertex(21, 17);</code><br>
41
+ <code>// Add the second control point.</code><br>
42
+ <code>curveVertex(32, 91);</code><br>
43
+ <code>endShape();</code><br>
44
+ </p>
56
45
57
46
<p>The code snippet above would only draw the curve between the anchor points,
58
47
@@ -63,34 +52,20 @@ description: >
63
52
64
53
<code>curveVertex()</code> with the coordinates of the control points:</p>
65
54
66
- <code>
67
-
68
- beginShape();
69
-
70
-
71
- <p>// Add the first control point and draw a segment to it.
72
-
73
- curveVertex(84, 91);
74
-
75
- curveVertex(84, 91);</p>
76
-
77
- <p>// Add the anchor points to draw between.
78
-
79
- curveVertex(68, 19);
80
-
81
- curveVertex(21, 17);</p>
82
-
83
- <p>// Add the second control point.
84
-
85
- curveVertex(32, 91);</p>
86
-
87
- <p>// Uncomment the next line to draw the segment to the second control point.
88
-
89
- // curveVertex(32, 91);</p>
90
-
91
- <p>endShape();
92
-
93
- </p></code>
55
+ <p>
56
+ <code>beginShape();</code><br>
57
+ <code>// Add the first control point and draw a segment to it.</code><br>
58
+ <code>curveVertex(84, 91);</code><br>
59
+ <code>curveVertex(84, 91);</code><br>
60
+ <code>// Add the anchor points to draw between.</code><br>
61
+ <code>curveVertex(68, 19);</code><br>
62
+ <code>curveVertex(21, 17);</code><br>
63
+ <code>// Add the second control point.</code><br>
64
+ <code>curveVertex(32, 91);</code><br>
65
+ <code>// Uncomment the next line to draw the segment to the second control point.</code><br>
66
+ <code>// curveVertex(32, 91);</code><br>
67
+ <code>endShape();</code><br>
68
+ </p>
94
69
95
70
<p>The first two parameters, <code>x</code> and <code>y</code>, set the
96
71
vertex’s location. For
@@ -399,3 +374,4 @@ chainable: true
399
374
400
375
401
376
# curveVertex
377
+
0 commit comments