-8
$\begingroup$

I don't have experience with Mathematica. I'd need that someone could help me. Could anyone be able to reproduce the following image by this software? Here, the blue quarter ellipse is completely outside the bold region, while the red one is inside.

enter image description here

$\endgroup$
6
$\begingroup$
sol = Solve[{
    x^2/a^2 + y^2/b^2 == 1 /. {x -> 5, y -> 2},
    x^2/a^2 + y^2/b^2 == 1 /. {x -> 4, y -> 3},
    a > 0, b > 0}, {a, b}][[1]]

(*  {a -> Sqrt[161/5], b -> Sqrt[161]/3}  *)

x^2/a^2 + y^2/b^2 == 1 /. sol

(*  (5*x^2)/161 + (9*y^2)/161 == 1  *)

Graphics[{
  Gray,
  Opacity[.25],
  Rectangle[{#, 0}] & /@ Range[0, 4],
  Rectangle[{#, 1}] & /@ Range[0, 4],
  Rectangle[{#, 2}] & /@ Range[0, 3],
  Opacity[1], Thick,
  Red,
  Tooltip[
   Circle[{0, 0}, {5, 3}, {0, Pi/2}],
   x^2/a^2 + y^2/b^2 == 1 /. {a -> 5, b -> 3}],
  Blue,
  Tooltip[
   Circle[{0, 0}, {a, b} /. sol, {0, Pi/2}],
   x^2/a^2 + y^2/b^2 == 1 /. sol]}, 
 GridLines -> {Range[0, 7], Range[0, 5]},
 Axes -> True,
 AxesLabel -> (Style[#, 14, Bold] & /@ {"x", "y"})]

enter image description here

$\endgroup$
  • $\begingroup$ The bold part is too light. Would you be able to blacken a little? $\endgroup$ – CHSLD Aug 8 '16 at 21:31
  • $\begingroup$ @CHSLD - I can't guess what color/darkness you want. Change Opacity[.25] to a larger number[e.g., .6) and/or change the color from LightGrayto Gray or any other color the you want. $\endgroup$ – Bob Hanlon Aug 8 '16 at 21:46
  • 1
    $\begingroup$ Just the normal Gray, not a LightGray. I don't have Mathematica. I just need the image $\endgroup$ – CHSLD Aug 8 '16 at 21:49
  • 2
    $\begingroup$ @CHSLD "I don't have Mathematica. I just need the image" - well next time, you can do it yourself. $\endgroup$ – J. M. will be back soon Aug 9 '16 at 4:45
3
$\begingroup$
Show[ContourPlot[x^2/6^2 + y^2/4^2 == 1, {x, 0, 6}, {y, 0, 4}, GridLines -> Automatic], 
ContourPlot[x^2/5^2 + y^2/3^2 == 1, {x, 0, 5}, {y, 0, 4},  ContourStyle -> Red], 
Table[Graphics[{Opacity[0.15], Rectangle[{x, y}]}], {x, 0, 3}, {y, 0,
2}], Graphics[{Opacity[0.15], Rectangle[{4, 0}]}], Graphics[{Opacity[0.15], Rectangle[{4, 1}]}]]

enter image description here

$\endgroup$
  • $\begingroup$ Could you insert the tiles and the bold part as the esquisse? $\endgroup$ – CHSLD Aug 8 '16 at 20:01
  • $\begingroup$ Sure thing man! $\endgroup$ – M Horsley Aug 8 '16 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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