Curve that touches three points: Difference between revisions
Content added Content deleted
(→{{header|zkl}}: added code) |
m (→{{header|zkl}}: pedantic) |
||
Line 171: | Line 171: | ||
fcn getPoints(n){ // int-->( (x,y) ..) |
fcn getPoints(n){ // int-->( (x,y) ..) |
||
pts:=List.createLong(2*n+1); |
pts:=List.createLong(2*n+1); |
||
dx,pt,cnt := (p[1][X] - p[0][X])/n |
dx,pt,cnt := (p[1][X] - p[0][X])/n, p[0][X], n; |
||
do(2){ |
do(2){ |
||
foreach i in (cnt){ |
foreach i in (cnt){ |
||
Line 196: | Line 196: | ||
}();</lang> |
}();</lang> |
||
{{out}} |
{{out}} |
||
Image at [http://www.zenkinetic.com/Images/RosettaCode/quadraticCurve.zkl.jpg |
Image at [http://www.zenkinetic.com/Images/RosettaCode/quadraticCurve.zkl.jpg quadratic curve] |