Hello and thanks for your time in advance.
The problem I'm having is that I can't figure out how to make a list of elements from the following expression:
(x-h)^2 + (y-k)^2 == r^2
What I'm trying to do is generate a list with a definite set of values for h
and k
with a fixed value of r
, to get something like this:
{(-1 + x)^2 + (-1 + y)^2 == 1, (-2 + x)^2 + (-2 + y)^2 == 1, (-3 + x)^2 + (-3 + y)^2 == 1}
The code I'm using is the following:
(-h + x)^2 + (-k + y)^2 == r^2 /. {h :> Range[1, 3], k :> Range[1, 3],r -> 1}
And from that I'm getting this:
{(-1 + x)^2 + (-1 + y)^2, (-2 + x)^2 + (-2 + y)^2, (-3 + x)^2 + (-3 + y)^2} == 1
I'm looking for any pointers on what I'm doing wrong because I can't figure it out.
Again thanks for any pointers, help or comments that could help me to figure out what to do.