Curve that touches three points: Difference between revisions
m
→{{header|Julia}}
Line 61:
=={{header|Julia}}==
To make things more specific, find the circle determined by the points. The curve is then the arc between the 3 points.
<lang julia>
# Find a circle passing through the 3 points
const p1 = Point(10, 10)
const p2 = Point(100, 200)
Line 85 ⟶ 86:
println("The circle with center at x = $a, y = $b and radius $r.")
# draw it (produces a PNG file by default).
Drawing()
origin()
circle(Point(a, b), r, :stroke)
finish()
</lang>{{out}}
<pre>
|