1
$\begingroup$

Hope to have a composite colour graphics after I put in complex number, part of t=1 is a color,part of t=2 is another color,and so on. Maybe my function is not good. How to fix it? Thanks a lot!

complexTicks[s_] := Transpose[{s, s I}]
ComplexBase4[b_, depth_, t_] := 
  Module[{i = 1}, 
   Show[Graphics[
    Map[
     Point[{Re[#], Im[#]}] &, 
     b^(t) (1 + Nest[Join[b #, b # + b] &, {0}, depth])]
    ], 
    PlotRange -> All, Frame -> True, AspectRatio -> Automatic, 
    FrameTicks -> {Automatic, complexTicks[Range[-2, 2]], None, None}, 
    PlotStyle -> (ColorData["ColorList"][#3] &)
   ]]

I have investigated this function in the past:

ComplexBase1[b_, depth_] := 
Module[{i = 1}, 
 Show[Graphics[
   Map[Point[{Re[#], Im[#]}] &, Nest[Join[b #, b # + b] &, {0}, depth]
 ]], PlotRange -> All, 
 Frame -> True, AspectRatio -> Automatic, 
 FrameTicks -> {Automatic, complexTicks[Range[-2, 2]], None, None}]
]

Then, I test some complex numbers like ComplexBase1[0.4 + 0.6 I, 15]

$\endgroup$
  • $\begingroup$ "Maybe my function is not good. How to fix it?" What's your question? $\endgroup$ – David G. Stork Jul 4 '18 at 17:36
2
$\begingroup$

Look at the Options for Graphics[], there is not option PlotStyle. All color functions must be put forward Point[]. Try this model

complexTicks[s_] := Transpose[{s, s I}]
ComplexBase4[b_, depth_, t_] := 
 Module[{i = 1}, 
  Show[Graphics[
    Map[{Hue[Abs[#], 1, 1, .3], Point[{Re[#], Im[#]}]} &, 
     b^(t) (1 + Nest[Join[b #, b # + b] &, {0}, depth])]], 
   PlotRange -> All, Frame -> True, AspectRatio -> Automatic, 
   FrameTicks -> {Automatic, complexTicks[Range[-2, 2]], None, None}]]
ComplexBase4[0.4 + 0.6 I, 15, 3]

fig1

$\endgroup$

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.