5
$\begingroup$

I want to draw a picture of $(x-t)^2 + (y-t^2)^2 - t^2$ in $xy$ plane, with different values of $t$. I did it in a very silly way , namely,

ContourPlot[{
  (x - 1)^2 + (y - 1)^2 == 1, (x - 2)^2 + (y - 4)^2 == 4, 
  (x - 3)^2 + (y - 9)^2 == 9, (x - 4)^2 + (y - 16)^2 == 16, 
  (x - 5)^2 + (y - 25)^2 == 25, (x - 6)^2 + (y - 36)^2 == 36, 
  (x - 7)^2 + (y - 49)^2 == 49, (x - 8)^2 + (y - 64)^2 == 64, 
  (x - 9)^2 + (y - 81)^2 == 81, (x - 10)^2 + (y - 100)^2 == 100, 
  (x + 1)^2 + (y - 1)^2 == 1, (x + 2)^2 + (y - 4)^2 == 4, 
  (x + 3)^2 + (y - 9)^2 == 9, (x + 4)^2 + (y - 16)^2 == 16, 
  (x + 5)^2 + (y - 25)^2 == 25, (x + 6)^2 + (y - 36)^2 == 36, 
  (x + 7)^2 + (y - 49)^2 == 49, (x + 8)^2 + (y - 64)^2 == 64, 
  (x + 9)^2 + (y - 81)^2 == 81, (x + 10)^2 + (y - 100)^2 == 100
 }, 
 {x, -110, 110}, {y, -110, 110}
]

I am sure there must be a simpler way. Could you give me a hand?

$\endgroup$

2 Answers 2

9
$\begingroup$

Use Table to generate the values for different t:

ContourPlot[Evaluate@Table[(x - t)^2 + (y - t^2)^2 == t^2, 
    {t, -20, 20, 1}], {x, -110, 110}, {y, -110, 110}]

enter image description here

$\endgroup$
1
  • $\begingroup$ I missed the fact that it was $(x - t)^2 + (y - t)^2$, so the Contours option doesn't work directly, +1. $\endgroup$
    – rcollyer
    Commented Apr 3, 2012 at 15:10
6
$\begingroup$

You can generate all formulae:

f = Function[t, (x - t)^2 + (y - t^2)^2 == t^2];
ContourPlot[Evaluate[f /@ Range[10]], {x, -110, 110}, {y, -110, 110}]

or interactively stroll through them:

Manipulate[
 ContourPlot[(x - t)^2 + (y - t^2)^2 == t^2, {x, -110, 110}, {y, -110,
    110}], {t, 1, 10, 1}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.