I try to illustrate a generation of an amoeba to a tropical curve, namely.

r0 = ComplexExpand[region["Line"] = ImplicitRegion[x + y + 1 == 0, {x, y}], {x, y}];
f = {Log[t, Abs[Indexed[#, 1]]], Log[t, Abs[Indexed[#, 2]]]} &;
r1 = TransformedRegion[r0, f];
Manipulate[ ParametricRegion[r1, t], {t, 100, 1000, 10}]    

Unfortunately, I don't get the result. How I can improve my code to get the illustration?


You could try this:

region["Line"] = ImplicitRegion[x + y + 1 == 0, {x, y}];
r0 = ComplexExpand[region["Line"], {x, y}];
f[t_] := {Log[t, Abs[Indexed[#, 1]]], Log[t, Abs[Indexed[#, 2]]]} &;
r1[t_] := TransformedRegion[r0, f[t]];
Manipulate[RegionPlot[r1[t]], {t, 100, 1000, 10}]
  • $\begingroup$ I get the following: Tag Function in ({Log[t,Abs[Indexed[#1,1]]],Log[t,Abs[Indexed[#1,2]]]}&)[t_] is Protected. $\endgroup$ – user44636 Jun 9 '15 at 16:05
  • $\begingroup$ Could it be that you have multiple definitions of the same object causing this issue? You could try to clear the global context using Clear["Global*"]` and re-run the code above. Alternatively you could try to restart Mathematica. $\endgroup$ – andy269 Jun 9 '15 at 16:17
  • $\begingroup$ Dear Andreas! Thank you for you help but I get something strange result: "{ParametricRegion[{{Log[Abs[x]]/Log[100],Log[Abs[y]]/Log[100]},1+x+y=\ =0},{x,y}][100]} is not a valid region to plot." $\endgroup$ – user44636 Jun 9 '15 at 16:26
  • $\begingroup$ I've just copy-paste your code and don't get any picture, I only get following: "AspectRatio->1 is not a valid variable." "ParametricRegion called with 1 argument; 2 arguments are expected. " "ParametricRegion is not a Graphics primitive or directive" " {ParametricRegion[{{Log[Abs[x]]/Log[100],Log[Abs[y]]/Log[100]},1+x+y==0},{x,y}][100]} is not a valid region to plot" $\endgroup$ – user44636 Jun 9 '15 at 16:33
  • $\begingroup$ The code I posted above works fine in Mathematica 10.1. I did not fix the aspect ratio, I only made minimal changes. So, if you start Mathematica, open a new notebook and copy-paste the code above it does not produce the plots? $\endgroup$ – andy269 Jun 9 '15 at 16:36

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.