Curve that touches three points: Difference between revisions

m
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>#using Find a circle passing through the 3 pointsLuxor
 
struct Point; x::Float64; y::Float64; end
# 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>
4,108

edits